/* ============================================================
   未来技术学院 · 采购 / 报增 / 报销 工作台
   设计令牌 → 布局 → 组件 → 响应式
   ============================================================ */

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 1. 令牌 ---------- */
:root {
  color-scheme: light;

  --bg: #F5F7FB;
  --bg-grad: none;
  --surface: #FFFFFF;
  --surface-2: #F5F7FB;
  --surface-3: #EDF1F8;
  --border: #E2E8F0;
  --border-strong: #C9D3E0;
  --text: #0F172A;
  --text-2: #4E5E75;
  --text-3: #5C6C82;
  --accent: #2457F5;
  --accent-2: #0B6E6D;
  --accent-weak: #E8EEFE;
  --accent-line: #B9C9FB;
  --danger: #b91c1c;
  --danger-weak: #fee2e2;
  --warn: #b45309;
  --warn-weak: #fef3c7;
  --ok: #047857;
  --ok-weak: #d1fae5;
  --violet: #6d28d9;
  --violet-weak: #ede9fe;
  --pink: #be185d;
  --pink-weak: #fce7f3;

  /* 浅色主题：侧栏与主区同一色系，避免「浅色页面 + 深色侧栏」割裂 */
  --side-bg: #FFFFFF;
  --side-bg-2: #F4F7FC;
  --side-text: #334155;
  --side-text-strong: #0F172A;
  --side-text-dim: #64748B;
  --side-line: #E2E8F0;
  --side-active: #E8EEFE;
  --side-active-text: #1D4ED8;
  --side-accent: #2457F5;
  --side-hover-bg: rgba(15, 23, 42, .055);

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;

  --shadow-1: 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-2: 0 4px 14px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow-3: 0 18px 40px rgba(15, 23, 42, .12);

  --gap: 24px;
  --pad: 28px;
  --sidebar-w: 268px;
  --topbar-h: 68px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0a1120;
  --bg-grad: radial-gradient(1100px 600px at 85% -10%, #10243a 0%, transparent 60%),
             radial-gradient(800px 500px at -10% 5%, #0f2b26 0%, transparent 55%);
  --surface: #111c2e;
  --surface-2: #16233a;
  --surface-3: #1c2c46;
  --border: #24334b;
  --border-strong: #33465f;
  --text: #e8eef7;
  --text-2: #aebbd0;
  --text-3: #8698b1;
  --accent: #38bdf8;
  --accent-2: #7dd3fc;
  --accent-weak: #0c2a3e;
  --accent-line: #0e7490;
  --danger: #f87171;
  --danger-weak: #3b1212;
  --warn: #fbbf24;
  --warn-weak: #3a2a08;
  --ok: #34d399;
  --ok-weak: #07291f;
  --violet: #c4b5fd;
  --violet-weak: #241a44;
  --pink: #f9a8d4;
  --pink-weak: #3a1226;

  --side-bg: #0b1526;
  --side-bg-2: #0f1d31;
  --side-text: #cbd5e1;
  --side-text-strong: #f1f5f9;
  --side-text-dim: #8A98AE;
  --side-line: rgba(148, 163, 184, .18);
  --side-active: rgba(36, 87, 245, .22);
  --side-active-text: #EAF0FF;
  --side-accent: #7dd3fc;
  --side-hover-bg: rgba(148, 163, 184, .10);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 6px 18px rgba(0, 0, 0, .45);
  --shadow-3: 0 24px 60px rgba(0, 0, 0, .55);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
time { font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.ico {
  width: 20px; height: 20px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- 3. 布局 ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* 侧栏 */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px 18px;
  background-color: var(--side-bg);
  background-image: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%);
  color: var(--side-text);
  border-right: 1px solid var(--side-line);
  z-index: 40;
}

.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 4px; }
.brand-mark {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 12px;
  font-size: 20px; font-weight: 700;
  color: #04121f;
  background: linear-gradient(150deg, #7dd3fc, #38bdf8 55%, #22d3ee);
  box-shadow: 0 6px 16px rgba(56, 189, 248, .35);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 15px; color: var(--side-text-strong); letter-spacing: .01em; }
.brand-text span { font-size: 12px; color: var(--side-text-dim); }
/* 副标题拆两行：学院 / 业务范围。合一行会在「销」字上孤字换行 */
.brand-text .brand-org { font-size: 11.5px; line-height: 1.35; letter-spacing: .02em; }
.brand-text .brand-tags { font-size: 11.5px; line-height: 1.35; letter-spacing: .06em; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--side-text);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav a .ico { grid-row: 1 / span 2; width: 20px; height: 20px; color: var(--side-text-dim); transition: color .18s; }
.nav a span { font-size: 14px; font-weight: 600; }
.nav a em { font-style: normal; font-size: 12px; color: var(--side-text-dim); letter-spacing: .02em; }
.nav a:hover { background: var(--side-hover-bg); color: var(--side-text-strong); }
.nav a:hover .ico { color: var(--side-text); }
.nav a.is-active { background: var(--side-active); color: var(--side-active-text); }
.nav a.is-active .ico { color: var(--side-accent); }
.nav a.is-active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: var(--side-accent);
}

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.doc-link {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, .08);
  border: 1px solid var(--side-line);
  color: var(--side-text);
  font-size: 13px; line-height: 1.5;
  transition: background .18s, border-color .18s;
}
.doc-link:hover { background: rgba(56, 189, 248, .1); border-color: rgba(56, 189, 248, .35); }
.doc-link .ico { width: 16px; height: 16px; color: var(--side-accent); margin-top: 1px; }

/* 主区 */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 clamp(16px, 3vw, 36px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 1px solid var(--border);
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.crumb .sep { opacity: .5; }
.crumb strong { color: var(--text); font-size: 14px; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--text-2);
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s;
}
.icon-btn .ico { width: 17px; height: 17px; stroke-width: 2; }
.link-item [data-copy] { color: var(--text-3); }
.link-item [data-copy]:hover { color: var(--accent); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }

.only-mobile { display: none; }
.only-dark { display: none; }
[data-theme="dark"] .only-light { display: none; }
[data-theme="dark"] .only-dark { display: grid; }

/* 内容 */
.view {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 36px) 72px;
  display: flex; flex-direction: column; gap: var(--gap);
  outline: none;
}
.view.enter > * { animation: rise .38s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: .04s; }
.view.enter > *:nth-child(3) { animation-delay: .08s; }
.view.enter > *:nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 4. 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .18s, background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}
.btn .ico { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"], .icon-btn:disabled,
input:disabled, select:disabled, textarea:disabled {
  opacity: .48; cursor: not-allowed; box-shadow: none;
}
.btn:disabled:active, .btn[aria-disabled="true"]:active { transform: none; }
.btn-primary:disabled, .btn-primary[aria-disabled="true"] {
  background: var(--surface-3);
  border-color: var(--border);
  color: var(--text-3);
}
.btn-primary {
  color: #f0f9ff;
  background: linear-gradient(160deg, #0b7cb5, #025d8d);
  box-shadow: 0 6px 16px rgba(3, 105, 161, .28);
}
.btn-primary:hover { background: linear-gradient(160deg, #0b88c6, #0369a1); box-shadow: 0 8px 20px rgba(3, 105, 161, .34); }
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-1);
}
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-sm { height: 44px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-sm .ico { width: 16px; height: 16px; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px;
  font-size: 14px; font-weight: 600;
  color: var(--accent);
  min-height: 26px;
  padding: 2px 0;
}
.text-link .ico { width: 16px; height: 16px; transition: transform .18s var(--ease); }
.text-link:hover .ico { transform: translateX(3px); }
.text-link:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px; font-weight: 650; letter-spacing: .02em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-green { color: var(--ok); background: var(--ok-weak); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }
.badge-orange { color: var(--warn); background: var(--warn-weak); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.badge-blue { color: var(--accent); background: var(--accent-weak); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.badge-warn { color: var(--warn); background: var(--warn-weak); border-color: color-mix(in srgb, var(--warn) 22%, transparent); }
.badge-type-opt { color: var(--accent); background: var(--accent-weak); }
.badge-type-text { color: var(--violet); background: var(--violet-weak); }
.badge-type-file { color: var(--warn); background: var(--warn-weak); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 34px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active {
  color: #f0f9ff; background: #0369a1; border-color: #0369a1;
  box-shadow: 0 4px 12px rgba(3, 105, 161, .25);
}
[data-theme="dark"] .chip.is-active { color: #04121f; background: #38bdf8; border-color: #38bdf8; }

.callout {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow-1);
}
.callout > .ico { color: var(--accent); margin-top: 2px; }
.callout > div { flex: 1; }
.callout h3 { font-size: 14px; margin-bottom: 4px; }
.callout p { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.callout-warn { border-left-color: var(--warn); }
.callout-warn > .ico { color: var(--warn); }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-2);
}
.empty .ico { width: 30px; height: 30px; color: var(--text-3); margin-bottom: 6px; }
.empty h2 { font-size: 16px; }
.empty p { font-size: 14px; color: var(--text-3); }

/* ---------- 5. 页头 ---------- */
.page-head { max-width: 880px; display: flex; flex-direction: column; gap: 10px; }
.page-head .lede { max-width: 88ch; }
.page-head h1 {
  font-size: clamp(26px, 2.6vw, 33px);
  font-weight: 680;
  letter-spacing: -.02em;
  line-height: 1.28;
}
.lede { font-size: 15px; line-height: 1.8; color: var(--text-2); }
.lede strong { color: var(--text); font-weight: 650; }

/* ---------- 6. 总览 ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
}
.hero-main {
  padding: clamp(24px, 3vw, 38px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(900px 320px at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}
.hero-main h1, .page-head h1, .block-head h2 { text-wrap: balance; }
.hero-main h1 {
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.22;
  letter-spacing: -.025em;
  font-weight: 700;
  margin-bottom: 14px;
}
.hero-main .lede { max-width: 62ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 28px; }

.hero-side { display: flex; flex-direction: column; gap: 14px; }
.side-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  border-top: 2px solid var(--warn);
}
.side-card h2 {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; margin-bottom: 12px;
}
.side-card h2 .ico { width: 17px; height: 17px; color: var(--warn); }
.tight-list { display: flex; flex-direction: column; gap: 10px; list-style: none; }
.tight-list li {
  position: relative;
  padding-left: 14px;
  font-size: 14px; line-height: 1.7; color: var(--text-2);
}
.tight-list li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--border-strong);
}
.tight-list b { color: var(--text); font-weight: 650; }
.side-card-muted { border-top-color: var(--border); background: color-mix(in srgb, var(--surface) 70%, var(--surface-2)); }
.side-card-muted h2 .ico { color: var(--text-3); }
.side-card-muted p { font-size: 13px; color: var(--text-2); line-height: 1.75; }

/* 区块 */
.block { display: flex; flex-direction: column; gap: 18px; }
.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.block-head h2 { font-size: 20px; letter-spacing: -.015em; }
.block-desc { font-size: 13px; color: var(--text-3); max-width: 46ch; line-height: 1.7; }
.block-head.compact { margin-bottom: 12px; }

/* 流程 */
.flow {
  display: grid;
  grid-template-columns: 1fr 34px 1fr 34px 1fr;
  align-items: stretch;
  gap: 0;
}
.flow-card {
  display: flex; flex-direction: column;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.flow-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.flow-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.flow-num {
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
}
.flow-head h3 { font-size: 20px; }
.flow-head p { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.flow-steps { display: flex; flex-direction: column; gap: 8px; list-style: none; counter-reset: s; margin-bottom: 18px; }
.flow-steps li {
  position: relative; padding-left: 20px;
  font-size: 14px; line-height: 1.65; color: var(--text-2);
}
.flow-steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 3px;
  width: 14px; height: 14px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--text-3);
}
.flow-link {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 650; color: var(--accent);
  min-height: 28px;
  padding: 2px 0;
}
.flow-link .ico { width: 15px; height: 15px; transition: transform .18s var(--ease); }
.flow-link:hover .ico { transform: translateX(3px); }
.flow-arrow { display: grid; place-items: center; color: var(--border-strong); }
.flow-arrow .ico { width: 18px; height: 18px; }
.flow-card.tone-green { border-top: 2px solid var(--ok); }
.flow-card.tone-green .flow-link { color: var(--ok);  min-height: 26px; align-items: center; }
.flow-card.tone-blue { border-top: 2px solid var(--accent); }
.flow-card.tone-orange { border-top: 2px solid var(--warn); }
.flow-card.tone-orange .flow-link { color: var(--warn);  min-height: 26px; align-items: center; }

/* 门槛表 */
.threshold-table {
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.threshold-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 13px 20px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.threshold-row:first-child { border-top: 0; }
.threshold-head {
  font-size: 12px; font-weight: 650; letter-spacing: .05em;
  color: var(--text-3); text-transform: uppercase;
  background: var(--surface-2);
}
.threshold-row .range { font-weight: 650; color: var(--text); }
.threshold-row[data-tone="ok"] .range { color: var(--ok); }
.threshold-row[data-tone="warn"] .range { color: var(--warn); }
.threshold-row[data-tone="danger"] .range { color: var(--danger); }
.threshold-row:not(.threshold-head):hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }

.fact-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fact {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
.fact-k { font-size: 20px; font-weight: 700; letter-spacing: -.02em; color: var(--accent); }
.fact-v { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.fact-ref { font-size: 12px; color: var(--text-3); letter-spacing: .02em; }

/* 分栏 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }

.quick-links { display: flex; flex-direction: column; gap: 8px; }
.quick-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .16s var(--ease), border-color .18s, box-shadow .18s;
}
.quick-link:hover { transform: translateX(3px); border-color: var(--accent-line); box-shadow: var(--shadow-1); }
.quick-dept { font-size: 12px; color: var(--text-3); letter-spacing: .02em; }
.quick-type { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 13px; font-weight: 650; color: var(--text); white-space: nowrap; }
.quick-url { font-size: 13px; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hot-contacts { display: flex; flex-direction: column; gap: 8px; }
.hot-contact {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.hot-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hot-info strong { font-size: 14px; }
.hot-info span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 12px;
  font-size: 16px; font-weight: 650;
  color: var(--accent);
  background: var(--accent-weak);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
}
.avatar-sm { width: 34px; height: 34px; font-size: 14px; border-radius: 10px; }

.phone-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all .16s var(--ease);
  white-space: nowrap;
}
.phone-chip .ico { width: 14px; height: 14px; color: var(--ok); }
.phone-chip:hover { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok-weak) 60%, var(--surface)); }

/* ---------- 7. 采购 ---------- */
.stage-grid { columns: 2; column-gap: 16px; }
.stage { break-inside: avoid; margin-bottom: 16px; }
.stage {
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  scroll-margin-top: 90px;
}
.stage.tone-green { --st: var(--ok); --st-w: var(--ok-weak); }
.stage.tone-orange { --st: var(--warn); --st-w: var(--warn-weak); }
.stage.tone-blue { --st: var(--accent); --st-w: var(--accent-weak); }
.stage.tone-warn { --st: var(--warn); --st-w: var(--warn-weak); }
.stage-head {
  display: flex; gap: 14px; align-items: center;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--st-w) 55%, var(--surface));
  border-bottom: 1px solid var(--border);
}
.stage-idx {
  width: 34px; height: 34px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 14px; font-weight: 700;
  color: var(--st);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--st) 25%, transparent);
}
.stage-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stage-title h2 { font-size: 16px; }
.stage-body { display: flex; flex-direction: column; }
.item {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}
.item:first-child { border-top: 0; }
.item.is-muted { background: var(--surface-2); }
.item.is-muted .item-text p, .item.is-muted .muted-text { color: var(--text-2); }
.item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.item-no {
  width: 20px; height: 20px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 6px;
  font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--text-3);
}
.item-head h3 { font-size: 14px; font-weight: 650; }
.item-ok {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 650; color: var(--ok);
}
.item-ok .ico { width: 14px; height: 14px; }
.item-text { display: flex; flex-direction: column; gap: 8px; }
.item-text p { font-size: 14px; line-height: 1.85; color: var(--text-2); }
.muted-text { font-size: 13px; color: var(--text-3); font-style: italic; }
.item-ref {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px; color: var(--text-3);
}
.item-ref .ico { width: 14px; height: 14px; }
.stage-note {
  display: flex; gap: 8px;
  padding: 12px 20px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-size: 12px; line-height: 1.7; color: var(--text-3);
}
.stage-note .ico { width: 15px; height: 15px; margin-top: 2px; flex: 0 0 auto; }
.stage-source { border-top: 1px solid var(--border); background: var(--surface-2); }
.stage-source > summary {
  display: flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 20px; cursor: pointer;
  font-size: 12px; color: var(--text-3); list-style: none;
}
.stage-source > summary::-webkit-details-marker { display: none; }
.stage-source > summary::before { content: '▸'; font-size: 10px; transition: transform .16s ease; }
.stage-source[open] > summary::before { transform: rotate(90deg); }
.stage-source > summary:hover { color: var(--text-2); }
.stage-source > .stage-note { border-top: 0; }

/* ---------- 8. 报增 ---------- */
.progress-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
.progress-text { display: flex; flex-direction: column; }
.progress-text strong { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.progress-text span { font-size: 12px; color: var(--text-3); }
.progress {
  height: 8px; border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress > span {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #22d3ee);
  transition: width .35s var(--ease);
}
.progress-actions { display: flex; align-items: center; gap: 12px; }
.progress-pct { font-size: 13px; font-weight: 650; color: var(--text-2); min-width: 38px; text-align: right; }

.asset-list { display: flex; flex-direction: column; gap: 10px; }
.asset-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  padding: 18px 20px 18px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transition: border-color .18s, background .18s, transform .18s var(--ease);
  scroll-margin-top: 90px;
}
.asset-item:hover { border-color: var(--border-strong); }
.asset-item.is-done { background: color-mix(in srgb, var(--ok-weak) 40%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 28%, var(--border)); }
.asset-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.asset-no {
  font-size: 12px; font-weight: 700; color: var(--text-3);
  letter-spacing: .04em;
}
.asset-head h2 { font-size: 16px; }
.asset-value {
  font-size: 13px; color: var(--text-2);
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface-2);
  margin-bottom: 10px;
  line-height: 1.7;
}
.asset-key { font-size: 13px; line-height: 1.8; color: var(--text-2); }
.asset-key span {
  display: inline-block;
  margin-right: 8px; padding: 1px 7px;
  border-radius: 5px;
  font-size: 12px; font-weight: 650; letter-spacing: .04em;
  color: var(--accent);
  background: var(--accent-weak);
}

/* 勾选框 */
.check-wrap { position: relative; display: block; width: 28px; height: 28px; margin-top: 2px; cursor: pointer; }
.check-wrap .check {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0; opacity: 0; cursor: pointer;
}
.check-mark {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1.5px solid var(--text-3);
  background: var(--surface-2);
  color: transparent;
  transition: all .16s var(--ease);
}
.check-mark .ico { width: 17px; height: 17px; stroke-width: 2.4; }
.check-wrap:hover .check-mark { border-color: var(--ok); }
.check:checked + .check-mark {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.check:focus-visible + .check-mark { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 9. 报销 ---------- */
.segmented {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
.seg {
  flex: 1 1 150px;
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all .16s var(--ease);
  white-space: nowrap;
}
.seg:hover { background: var(--surface-2); color: var(--text); }
.seg.is-active {
  background: #0f172a; color: #f1f5f9;
  border-color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .2);
}
[data-theme="dark"] .seg.is-active { background: #38bdf8; border-color: #38bdf8; color: #04121f; }
.seg-no {
  display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--text-3);
}
.seg.is-active .seg-no { background: rgba(255, 255, 255, .16); color: inherit; }
[data-theme="dark"] .seg.is-active .seg-no { background: rgba(4, 18, 31, .14); }
.seg em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--text-2); }
.seg.is-active em { color: inherit; opacity: .85; }

.reim-body { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 90px; }
.reim-body.tone-blue { --rt: var(--accent); --rt-w: var(--accent-weak); }
.reim-body.tone-orange { --rt: var(--warn); --rt-w: var(--warn-weak); }
.reim-body.tone-green { --rt: var(--ok); --rt-w: var(--ok-weak); }
.reim-body.tone-violet { --rt: var(--violet); --rt-w: var(--violet-weak); }
.reim-body.tone-pink { --rt: var(--pink); --rt-w: var(--pink-weak); }
.reim-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--rt) 9%, var(--surface));
  border: 1px solid var(--border);
  border-left: 3px solid var(--rt);
}
.reim-head h2 { font-size: 20px; }
.reim-count { font-size: 12px; font-weight: 650; color: var(--rt); }

.reim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.reim-card {
  display: flex; flex-direction: column;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transition: border-color .18s, background .18s;
  scroll-margin-top: 90px;
}
.reim-card.is-done { background: color-mix(in srgb, var(--ok-weak) 38%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 26%, var(--border)); }
.reim-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.reim-top h3 { font-size: 15px; }
.reim-keys { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.reim-keys li {
  position: relative; padding-left: 16px;
  font-size: 13px; line-height: 1.8; color: var(--text-2);
}
.reim-keys li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--rt, var(--accent));
  opacity: .65;
}
.reim-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mini-stat {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--rt-w) 55%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--rt) 18%, transparent);
}
.mini-stat em { font-style: normal; font-size: 12px; color: var(--text-3); }
.mini-stat strong { font-size: 14px; color: var(--rt); }

/* ---------- 10. 对接人 ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
}
.input-icon {
  position: relative; flex: 1 1 320px;
  display: flex; align-items: center;
}
.input-icon .ico { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--text-3); pointer-events: none; }
.input-icon input {
  width: 100%; height: 40px;
  padding: 0 12px 0 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 14px;
  transition: border-color .18s, background .18s;
}
.input-icon input::placeholder { color: var(--text-3); }
.input-icon input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.filter-count { font-size: 13px; color: var(--text-3); white-space: nowrap; }

.dept { display: flex; flex-direction: column; gap: 14px; }
.dept + .dept { margin-top: 10px; }
.dept-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.dept-head h2 { font-size: 20px; }
.dept-head p { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.dept-count { font-size: 12px; font-weight: 650; color: var(--text-3); white-space: nowrap; }
.dept.tone-amber { --dt: #b45309; }
.dept.tone-green { --dt: var(--ok); }
.dept.tone-sky { --dt: var(--accent); }

.dept-duty {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.dept-duty summary {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  cursor: pointer;
  list-style: none;
  transition: background .16s, color .16s;
}
.dept-duty summary::-webkit-details-marker { display: none; }
.dept-duty summary:hover { background: var(--surface-2); color: var(--text); }
.dept-duty summary .ico { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.dept-duty[open] summary .ico { transform: rotate(180deg); }
.dept-duty p {
  padding: 0 18px 16px;
  font-size: 13px; line-height: 1.85; color: var(--text-2);
}

.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.contact-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transition: transform .18s var(--ease), box-shadow .18s, border-color .18s;
  scroll-margin-top: 90px;
}
.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.contact-card.is-empty { opacity: .75; border-style: dashed; }
.contact-top { display: flex; align-items: center; gap: 12px; }
.contact-id { flex: 1; min-width: 0; }
.contact-id h3 { font-size: 15px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.contact-id h3 small { font-size: 12px; font-weight: 500; color: var(--text-3); }
.contact-type { font-size: 12px; color: var(--text-3); }
.no-badge {
  font-size: 12px; font-weight: 700;
  color: var(--text-3);
  padding: 2px 7px; border-radius: 6px;
  background: var(--surface-2);
}
.phone-row { display: flex; flex-wrap: wrap; gap: 8px; }
.phone-none { font-size: 13px; color: var(--text-3); font-style: italic; }
.contact-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.contact-meta dt { font-size: 12px; letter-spacing: .05em; color: var(--text-3); text-transform: uppercase; }
.contact-meta dd { margin: 0; font-size: 13px; color: var(--text-2); }
.duty summary {
  display: flex; align-items: center; gap: 6px;
  min-height: 28px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  cursor: pointer; list-style: none;
}
.duty summary::-webkit-details-marker { display: none; }
.duty summary .ico { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.duty[open] summary .ico { transform: rotate(180deg); }
.duty p { margin-top: 8px; font-size: 13px; line-height: 1.85; color: var(--text-2); }

/* ---------- 11. 系统入口 ---------- */
.link-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; align-items: start; }
.link-group {
  display: flex; flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.link-group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
  border-bottom: 1px solid var(--border);
}
.link-group-head h2 { font-size: 16px; }
.link-group-head p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.link-list { display: flex; flex-direction: column; }
.link-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px 13px 20px;
  border-top: 1px solid var(--border);
  transition: background .16s;
  scroll-margin-top: 90px;
}
.link-row:first-child { border-top: 0; }
.link-row:hover { background: var(--surface-2); }
.link-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.link-main .badge { align-self: flex-start; margin-bottom: 2px; }
.link-url {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 28px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.link-url .ico { width: 14px; height: 14px; flex: 0 0 auto; }
.link-url:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-ref { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); }
.link-ref .ico { width: 13px; height: 13px; }

/* ---------- 12. 搜索面板 ---------- */
.palette { position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding-top: min(14vh, 130px); }
.palette[hidden] { display: none; }
.palette-backdrop { position: absolute; inset: 0; background: rgba(8, 15, 26, .55); backdrop-filter: blur(3px); }
.palette-card {
  position: relative;
  width: min(680px, calc(100vw - 32px));
  max-height: min(70vh, 620px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: pop .2s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: none; } }
.palette-input {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 16px;
  border-bottom: 1px solid var(--border);
}
.palette-input .ico { color: var(--text-3); }
.palette-input input {
  flex: 1; height: 40px; border: 0; background: transparent;
  color: var(--text); font-size: 15px;
}
.palette-input input:focus { outline: none; }
.palette-results { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.palette-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  border: 0; border-radius: 10px;
  background: transparent; text-align: left;
  cursor: pointer;
}
.palette-item.is-active { background: var(--surface-2); }
.pal-arrow { width: 16px; height: 16px; color: var(--text-3); opacity: 0; }
.palette-item.is-active .pal-arrow { opacity: 1; }
.pal-kind {
  flex: 0 0 auto; width: 52px;
  font-size: 12px; font-weight: 650; text-align: center;
  padding: 3px 0; border-radius: 6px;
  color: var(--accent); background: var(--accent-weak);
}
.pal-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pal-body strong { font-size: 14px; }
.pal-body span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-empty { padding: 28px 20px; text-align: center; font-size: 14px; color: var(--text-3); }
.palette-hint { padding: 8px 14px 6px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--border); margin-bottom: 4px; }

/* ---------- 13. 金额判断器 ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 15, 26, .55); backdrop-filter: blur(3px); }
.modal-card {
  position: relative;
  width: min(980px, 100%);
  max-height: min(88vh, 860px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: pop .22s var(--ease);
}
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 22px; letter-spacing: -.02em; }
.modal-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  min-height: 0;
}
.calc-form {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 22px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 650; letter-spacing: .03em; color: var(--text-3); }
.field input[type="number"], .field select {
  height: 42px; padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.input-suffix { position: relative; display: flex; align-items: center; }
.input-suffix input { width: 100%; padding-right: 52px; }
.input-suffix span { position: absolute; right: 12px; font-size: 13px; color: var(--text-3); pointer-events: none; }
.field-check { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 6px; }
.checkline {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  padding: 4px 0; font-size: 14px; color: var(--text-2); cursor: pointer;
  min-height: 32px;
}
.checkline input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checkline .box {
  width: 18px; height: 18px; flex: 0 0 auto;
  border: 1.5px solid var(--text-3); border-radius: 5px;
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.checkline .box::after {
  content: ''; width: 10px; height: 6px; margin-top: -2px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .15s;
}
.checkline input:checked + .box { background: var(--accent); border-color: var(--accent); }
.checkline input:checked + .box::after { transform: rotate(-45deg) scale(1); }
.checkline input:focus-visible + .box { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.calc-note { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; font-size: 12px; line-height: 1.7; color: var(--text-3); }
.calc-note .ico { width: 15px; height: 15px; margin-top: 2px; flex: 0 0 auto; }

.calc-result { padding: 22px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.calc-summary {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.calc-summary > div {
  display: flex; flex-direction: column; gap: 1px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  min-width: 92px;
}
.calc-summary span { font-size: 12px; letter-spacing: .05em; color: var(--text-3); text-transform: uppercase; }
.calc-summary strong { font-size: 14px; }
.verdicts { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.verdict {
  display: flex; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
}
.verdict-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: 0 0 auto; background: var(--border-strong); }
.verdict h3 { font-size: 14px; margin-bottom: 3px; }
.verdict p { font-size: 13px; line-height: 1.75; color: var(--text-2); }
.verdict-ref { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.verdict.tone-ok { border-left-color: var(--ok); }
.verdict.tone-ok .verdict-dot { background: var(--ok); }
.verdict.tone-warn { border-left-color: var(--warn); }
.verdict.tone-warn .verdict-dot { background: var(--warn); }
.verdict.tone-danger { border-left-color: var(--danger); }
.verdict.tone-danger .verdict-dot { background: var(--danger); }
.verdict.tone-info { border-left-color: var(--accent); }
.verdict.tone-info .verdict-dot { background: var(--accent); }
.calc-disclaimer {
  display: flex; gap: 8px;
  font-size: 12px; line-height: 1.7; color: var(--text-3);
  padding-top: 4px;
}
.calc-disclaimer .ico { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: var(--warn); }

/* ---------- 14. 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 120;
  transform: translate(-50%, 14px);
  padding: 10px 18px;
  border-radius: 10px;
  background: #0f172a; color: #f1f5f9;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-3);
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
[data-theme="dark"] .toast { background: #e2e8f0; color: #0b1220; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.flash { animation: flash 1.6s var(--ease); }
@keyframes flash {
  0%, 100% { box-shadow: var(--shadow-1); }
  20%, 60% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 32%, transparent), var(--shadow-2); }
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { display: grid; grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 28px 1fr 28px 1fr; }
  .fact-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .modal-body { grid-template-columns: 1fr; overflow-y: auto; }
  .calc-form { border-right: 0; border-bottom: 1px solid var(--border); }
}

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .only-mobile { display: inline-grid; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: min(300px, 86vw); height: 100vh;
    display: none;
    box-shadow: var(--shadow-3);
  }
  body.nav-open .sidebar { display: flex; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; z-index: 35;
    background: rgba(8, 15, 26, .45);
  }
  .topbar { padding: 0 16px; gap: 10px; }
  .flow { grid-template-columns: 1fr; }
  .stage-grid { columns: 1; }
  .flow-arrow { height: 26px; transform: rotate(90deg); }
  .hero-side { grid-template-columns: 1fr; }
  .threshold-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 18px; }
  .threshold-head { display: none; }
  .threshold-row span:nth-child(2)::before { content: "学院项目经费："; color: var(--text-3); }
  .threshold-row span:nth-child(3)::before { content: "个人项目经费："; color: var(--text-3); }
  .threshold-row span:nth-child(2), .threshold-row span:nth-child(3) { font-size: 13px; color: var(--text-2); }
  .progress-card { grid-template-columns: 1fr; gap: 12px; }
  .progress-actions { justify-content: space-between; }
  .progress-pct { text-align: left; }
  .asset-item { grid-template-columns: 32px minmax(0, 1fr); padding: 16px; gap: 10px; }
  .seg { flex: 1 1 100%; }
  .contact-meta { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .view { padding: 16px 14px 96px; gap: 20px; }
  .hero-main { padding: 22px 18px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .fact-row { grid-template-columns: 1fr; }
  .crumb { display: none; }
  .topbar { gap: 8px; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { width: 44px; padding: 0; justify-content: center; }
  .segmented { padding: 4px; }
  .quick-link { gap: 2px 8px; padding: 12px 14px; }
  .quick-type { white-space: normal; text-align: right; max-width: 42vw; }
  .reim-grid, .link-groups { grid-template-columns: 1fr; }
  .palette { padding-top: 40px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-card { max-height: 92vh; border-radius: 18px 18px 0 0; }
  .calc-form { padding: 16px; }
  .calc-result { padding: 16px; }
  .toast { bottom: 18px; max-width: calc(100vw - 36px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .sidebar, .topbar, .toast, .palette, .modal, .chips, .progress-actions { display: none !important; }
  .app { display: block; }
  .view { max-width: none; padding: 0; }
  body { background: #fff; }
}

/* ============ 第二轮新增：政采 / 耗材 / 财务速查 / 通讯录 ============ */

/* 门槛表四列 */
.threshold-4 .threshold-row { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.threshold-4 .threshold-head span:first-child { text-align: left; }

/* 采购：六种方式 / 归口部门 */
.method-list, .buyer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.method-list li, .buyer-list li {
  display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1);
}
.method-list b, .buyer-list b { font-size: 14px; color: var(--text); font-weight: 600; }
.method-list span, .buyer-list span { font-size: 13px; line-height: 1.65; color: var(--text-2); }

/* 报增：分组 */
.asset-group { margin-top: 28px; }
.asset-group > .block-head { margin-bottom: 12px; }

/* 通用列表 */
.note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.note-list li {
  position: relative; padding: 12px 14px 12px 30px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text-2); font-size: 13px; line-height: 1.7;
}
.note-list li::before {
  content: ""; position: absolute; left: 14px; top: 19px; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent);
}
.num-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--text-2); font-size: 13px; line-height: 1.7; }
.num-list li::marker { color: var(--accent); font-variant-numeric: tabular-nums; }
.para { margin: 0 0 12px; color: var(--text-2); font-size: 13px; line-height: 1.75; }
.note-line { margin: 10px 0 0; color: var(--text-3); font-size: 12px; line-height: 1.7; }
.note-line span { color: var(--text-2); font-weight: 600; margin-right: 6px; }
.source-line { margin: 24px 0 0; color: var(--text-3); font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

/* 政采：判断表单 */
.gov-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px 16px; margin: 4px 0 18px;
}
.gov-form .field { display: grid; gap: 6px; }
.field > span:first-child { font-size: 12px; color: var(--text-2); font-weight: 600; }
.field select, .field input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px;
}
.field select:focus-visible, .field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.input-wrap { position: relative; display: block; }
.input-wrap input { padding-right: 46px; }
.input-wrap em {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-size: 12px; color: var(--text-3); pointer-events: none;
}
.gov-verdict { margin-top: 6px; }
.gov-empty { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-3); font-size: 13px; }

/* 政采：限额 / 规则 / 品目表 */
.gov-limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.gov-limit {
  padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow-1); display: grid; gap: 6px;
}
.gov-limit span { font-size: 12px; color: var(--text-3); }
.gov-limit b { font-size: 14px; color: var(--text); line-height: 1.6; font-weight: 600; }
.gov-rules { display: grid; gap: 10px; }
.gov-rule { display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: start; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.gov-rule p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--text-2); }

.gov-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.gov-row {
  display: grid; grid-template-columns: 64px 1fr 190px 120px; gap: 12px; align-items: center;
  padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.gov-row:last-child { border-bottom: 0; }
.gov-head { background: var(--surface-2); font-size: 12px; color: var(--text-3); font-weight: 600; }
.gov-row b { color: var(--text); font-weight: 600; }
.gov-row em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--text-3); }
.gov-no { color: var(--text-3); font-variant-numeric: tabular-nums; }
.badge-gov-frame { background: var(--accent-weak); color: var(--accent-2); }
.badge-gov-c100 { background: var(--warn-weak); color: var(--warn); }
.badge-gov-bidding { background: var(--violet-weak); color: var(--violet); }
.badge-gov-fixed, .badge-gov-item { background: var(--surface-3); color: var(--text-2); }
.badge-gov-fw { background: var(--ok-weak); color: var(--ok); }
.year-seg { margin: 0; }
.year-seg .seg { min-height: 36px; padding: 0 14px; }

/* 年度对比 */
.compare-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.compare-row {
  display: grid; grid-template-columns: 220px 1fr 1fr 68px; gap: 14px; align-items: start;
  padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.65;
}
.compare-row:last-child { border-bottom: 0; }
.compare-row b { color: var(--text); font-weight: 600; }
.cmp-old { color: var(--text-3); }
.cmp-old em { display: block; font-style: normal; font-size: 12px; color: var(--text-3); }
.cmp-new { color: var(--text-2); }
.cmp-diff { justify-self: end; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.diff-same { background: var(--surface-3); color: var(--text-2); }
.diff-up { background: var(--ok-weak); color: var(--ok); }
.diff-down { background: var(--danger-weak); color: var(--danger); }

/* 耗材 */
.biz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 16px; margin-top: 20px; }
.biz-card { padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-1); display: grid; gap: 12px; }
.biz-head { display: flex; align-items: center; gap: 10px; }
.biz-no { font-size: 12px; color: var(--accent-2); background: var(--accent-weak); padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.biz-head h2 { margin: 0; font-size: 16px; color: var(--text); }
.step-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); font-size: 13px; line-height: 1.7; }
.step-list li::marker { color: var(--text-3); }
.biz-tip { margin: 0; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); color: var(--text-2); font-size: 12px; line-height: 1.7; }
.biz-tip span { color: var(--warn); font-weight: 600; margin-right: 6px; }

/* 报销：开票信息 / 审批表 / 差旅 */
.invoice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.invoice-row {
  display: grid; grid-template-columns: 88px 1fr 34px; gap: 10px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.invoice-row span { font-size: 12px; color: var(--text-3); }
.invoice-row b { font-size: 13px; color: var(--text); font-weight: 600; word-break: break-all; }

.mini-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.mini-row { display: grid; grid-template-columns: 1.1fr .9fr 1.4fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-2); line-height: 1.6; }
.mini-row:last-child { border-bottom: 0; }
.mini-head { background: var(--surface-2); font-size: 12px; color: var(--text-3); font-weight: 600; }
.mini-row span:first-child { color: var(--text); }
.mini-head span:first-child { color: var(--text-3); }

.kv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kv-list li { display: grid; grid-template-columns: 128px 1fr; gap: 12px; padding: 10px 14px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.65; }
.kv-list span { color: var(--text-3); }
.kv-list b { color: var(--text); font-weight: 600; }

/* 通讯录 */
.dir-meta { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.dir-meta .wide { grid-column: 1 / -1; }
.mail-link { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 0; color: var(--accent-2); text-decoration: none; word-break: break-all; }
.linkish { display: inline-flex; align-items: center; min-height: 26px; }
.mail-link:hover { text-decoration: underline; }
.linkish { border: 0; background: none; padding: 2px 0; color: var(--accent-2); font: inherit; cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.directory-block { margin-top: 36px; }
.dir-dept { margin-top: 18px; }
.dir-dept h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 15px; color: var(--text); }
.dir-dept h3 span { font-size: 12px; color: var(--text-3); font-weight: 500; }
.dir-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.dir-row { display: grid; grid-template-columns: 110px 130px 90px 140px 1fr 1.3fr; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.dir-row:last-child { border-bottom: 0; }
.dir-head { background: var(--surface-2); font-size: 12px; color: var(--text-3); font-weight: 600; }
.dir-row b { color: var(--text); font-weight: 600; }

@media (max-width: 1180px) {
  .gov-row { grid-template-columns: 52px 1fr 160px 110px; }
  .compare-row { grid-template-columns: 200px 1fr 1fr 68px; }
  .dir-row { grid-template-columns: 96px 116px 76px 126px 1fr 1.2fr; }
}
@media (max-width: 960px) {
  .biz-grid { grid-template-columns: 1fr; }
  .gov-rule { grid-template-columns: 1fr; gap: 6px; }
  .dir-row { grid-template-columns: 84px 1fr 1fr; }
  .dir-row span:nth-child(4), .dir-row span:nth-child(5), .dir-row span:nth-child(6) { display: none; }
}
@media (max-width: 560px) {
  .gov-row { grid-template-columns: 40px 1fr; }
  .gov-row span:nth-child(3), .gov-row span:nth-child(4) { grid-column: 2; }
  .compare-row { grid-template-columns: 1fr; }
  .cmp-diff { justify-self: start; }
  .invoice-grid { grid-template-columns: 1fr; }
  .mini-row { grid-template-columns: 1fr; }
  .kv-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* 行长控制：中文正文不超过约 45 字 */
.block.split .num-list, .block.split .para, .block.split .note-list, .para,
.biz-card .step-list, .biz-card .biz-tip { max-width: 560px; }

@media (max-width: 960px) {
  .compare-row { grid-template-columns: 1fr 1fr; row-gap: 6px; }
  .compare-row b { grid-column: 1 / -1; }
  .cmp-diff { justify-self: start; grid-column: 1 / -1; }
}

/* 正文行长：中文约 45 字以内 */
.stage-note, .item-text p, .asset-key, .asset-value, .reim-keys li, .link-ref { max-width: none; }

/* 提示条正文行长 */
.callout p, .callout h3 { max-width: 620px; }

/* 四列门槛表在窄屏改为逐行列出 */
@media (max-width: 960px) {
  .threshold-4 .threshold-row { grid-template-columns: 1fr; gap: 4px; }
  .threshold-4 .threshold-row span:nth-child(2)::before { content: "自行采购："; color: var(--text-3); }
  .threshold-4 .threshold-row span:nth-child(3)::before { content: "网上竞价："; color: var(--text-3); }
  .threshold-4 .threshold-row span:nth-child(4)::before { content: "公开招标："; color: var(--text-3); }
}
/* 分栏内的最小宽度，避免 6px 溢出 */
.block.split > div { min-width: 0; }
.quick-link { min-width: 0; }

/* 年度切换：两枚胶囊并排，不随容器拉满 */
.year-seg { display: inline-flex; gap: 8px; flex-wrap: nowrap; flex: 0 0 auto; justify-content: flex-end; }
.year-seg button { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.year-seg button:hover { border-color: var(--accent); color: var(--text); }
.year-seg button.is-active { background: var(--text); color: var(--surface); border-color: var(--text); }
@media (max-width: 560px) { .year-seg { width: 100%; justify-content: flex-start; } .year-seg button { flex: 1 1 0; } }

/* ================= 第三轮新增：系统入口条 / 规格表 / 建账表 / 报销表 / 政采检索 ================= */

/* 模块顶部的四个显眼入口 */
.sysbar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  margin: 0 0 22px;
}
.sys-btn {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; min-height: 64px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-1);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sys-btn:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.sys-ico {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--surface-2); color: var(--accent-2);
}
.sys-ico .ico { width: 19px; height: 19px; }
.sys-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sys-txt b { font-size: 14.5px; font-weight: 700; letter-spacing: .01em; }
.sys-txt span { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sys-btn .i-ext { margin-left: auto; width: 14px; height: 14px; color: var(--text-3); flex: 0 0 auto; }
.sys-btn.is-current { border-color: var(--accent); background: var(--accent-weak); }
.sys-btn.is-current .sys-ico { background: var(--surface); color: var(--accent); }
.sys-btn.is-current .sys-txt b { color: var(--accent-2); }

/* 规格表：源表长段落的表格化 */
.spec-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.spec-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: 14px; align-items: start;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; line-height: 1.7; color: var(--text-2);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row > span:first-child { color: var(--text); font-weight: 600; }
.spec-head { background: var(--surface-2); font-size: 12px; font-weight: 650; color: var(--text-3); letter-spacing: .02em; }
.spec-head > span:first-child { color: var(--text-3); font-weight: 650; }
.spec-foot {
  padding: 9px 14px; background: var(--surface-2); border-top: 1px solid var(--border);
  font-size: 12px; line-height: 1.65; color: var(--text-3);
}
.is-mono { font-variant-numeric: tabular-nums; }

/* 建账字段表 */
.field-group { margin-bottom: 26px; }
.field-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.field-group-head h2 { font-size: 16px; }
.field-group-head span { font-size: 13px; color: var(--text-3); }
.field-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1); }
.field-row {
  display: grid; grid-template-columns: 44px minmax(140px, 190px) minmax(0, 1.05fr) minmax(0, 1.25fr);
  gap: 14px; align-items: start;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; line-height: 1.7;
}
.field-row:last-child { border-bottom: 0; }
.field-head { background: var(--surface-2); font-size: 12px; font-weight: 650; color: var(--text-3); }
.field-head > span { color: var(--text-3); }
.field-no { color: var(--text-3); font-variant-numeric: tabular-nums; }
.field-name { color: var(--text); font-weight: 600; }
.field-name .badge { margin-left: 6px; }
.field-value { color: var(--text-2); }
.field-key { color: var(--text-3); }
.field-row[hidden] { display: none; }
.field-group[hidden] { display: none; }

/* 报销：五类平铺表 */
.reim-body {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-1);
  overflow: hidden; scroll-margin-top: 90px;
  margin-bottom: 18px;
}
.reim-body .reim-head { border-bottom: 1px solid var(--border); }
.reim-table { border: 0; border-radius: 0; box-shadow: none; }
.reim-table .spec-row { grid-template-columns: 170px minmax(0, 1fr); grid-auto-flow: row; }
.reim-table .spec-row > span:first-child { color: var(--text); }
.reim-keys { margin: 0; padding-left: 16px; display: grid; gap: 4px; }
.reim-keys li { color: var(--text-2); }
.mini-stat { display: inline-flex; gap: 8px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.inline-std { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--rt, var(--accent)); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.inline-std h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: .04em; color: var(--text-3); text-transform: none; }
.note-list.cols-2 { columns: 2; column-gap: 26px; }
.note-list.cols-2 li { break-inside: avoid; margin-bottom: 8px; }

/* 政采：检索块 + 六列表 */
.gov-search-block { margin-bottom: 22px; }
.search-hint { font-size: 13px; color: var(--text-3); }
.gov-row {
  grid-template-columns: 44px minmax(120px, 160px) 58px 132px minmax(170px, 1.5fr) minmax(0, 1fr);
  align-items: start;
}
.gov-kind { color: var(--text-2); }
.gov-code { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.gov-note { font-size: 13px; color: var(--text-3); }
.gov-rule { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.gov-rule em { margin-top: 0; }
.gov-row.is-hit { background: var(--accent-weak); }
.field-hit { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--accent-2); }
.input-hint { position: static; font-size: 12px; color: var(--accent-2); white-space: nowrap; }
.input-suffix:has(.input-hint) { gap: 8px; }
.input-suffix:has(.input-hint) input { padding-right: 12px; }
.field-wide { grid-column: 1 / -1; }

@media (max-width: 1180px) {
  .sys-txt span { display: none; }
  .sys-btn { min-height: 56px; }
}
@media (max-width: 960px) {
  .sysbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-row { grid-auto-flow: row; grid-auto-columns: auto; gap: 4px; }
  .spec-head { display: none; }
  .field-row { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; }
  .field-head { display: none; }
  .field-value, .field-key { grid-column: 2; }
  .reim-table .spec-row { grid-template-columns: 1fr; gap: 4px; }
  .gov-row { grid-template-columns: 40px minmax(0, 1fr) 58px; gap: 8px; }
  .gov-code, .gov-note { display: none; }
  .note-list.cols-2 { columns: 1; }
}
@media (max-width: 560px) {
  .sysbar { grid-template-columns: 1fr; gap: 8px; }
  .sys-btn { min-height: 52px; padding: 10px 12px; }
  .field-row { grid-template-columns: 32px minmax(0, 1fr); }
}

/* 政采检索块：.block 是 flex 列，避免 input-icon 的 flex-basis 被当成高度 */
.gov-search-block .input-icon { flex: none; width: 100%; }
.gov-search-block .search-hint { margin: 8px 0 0; }
.gov-row .gov-rule em { max-width: 100%; }

.gov-row { grid-template-columns: 44px minmax(120px, 170px) 58px 130px minmax(220px, 1.15fr) minmax(0, 1fr); }

/* 政采表格：徽标与短说明同行，行高更紧凑 */
.gov-row { padding-top: 9px; padding-bottom: 9px; align-items: center; }
.gov-row .gov-rule { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; }
.gov-row .gov-rule em { margin: 0; white-space: normal; }
.gov-row .gov-note { align-self: center; }

/* 计算器：左侧表单略加宽，品目提示占据独立一行 */
.calc-form { flex: 0 0 300px; }
.input-hint { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); min-height: 16px; }
.input-hint.is-hit { color: var(--ok); }
.field-wide .input-suffix { display: block; }
.field-wide .input-suffix input { padding-right: 12px; }
@media (max-width: 960px) { .calc-form { flex: none; } }

/* 品目提示：压过 .input-suffix span 的绝对定位 */
.field-wide .input-suffix .input-hint { position: static; right: auto; margin-top: 4px; text-align: left; }

/* 窄屏：徽标不折行、字号收敛 */
.badge-gov { white-space: nowrap; }
@media (max-width: 560px) {
  .gov-row { grid-template-columns: 34px minmax(0, 1fr) 52px; }
  .sys-txt b { font-size: 14px; }
}
@media (max-width: 960px) {
  .sys-txt b { font-size: 14px; }
  .spec-row { font-size: 13px; }
  .field-name { font-size: 13px; }
}

/* 政采表格窄屏卡片式 */
@media (max-width: 960px) {
  .gov-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 3px 8px; padding: 10px 12px; align-items: start;
  }
  .gov-head { display: none; }
  .gov-no { grid-area: 1 / 1 / span 4 / 2; }
  .gov-name { grid-area: 1 / 2 / 2 / 4; font-size: 14px; }
  .gov-kind { grid-area: 2 / 2 / 3 / 3; display: block; font-size: 12px; color: var(--text-3); }
  .gov-code { grid-area: 2 / 3 / 3 / 4; display: block; text-align: right; font-size: 12px; }
  .gov-rule { grid-area: 3 / 2 / 4 / 4; display: flex; }
  .gov-note { grid-area: 4 / 2 / 5 / 4; display: block; }
  .sys-txt b { font-size: 14px; }
}
.gov-note { font-size: 12px; }
.sys-txt b { font-size: 14px; }

/* ================= 第四轮：单入口条 / 坑位列表 / 表格不折行 ================= */

.sys-entry {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 22px; padding: 14px 18px;
  border: 1px solid var(--accent); border-radius: var(--radius);
  background: var(--accent-weak); color: var(--text);
  transition: box-shadow .15s, transform .15s;
}
.sys-entry:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.sys-entry .sys-ico { background: var(--surface); color: var(--accent); width: 40px; height: 40px; border-radius: 11px; }
.sys-entry .sys-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sys-entry .sys-txt b { font-size: 15px; font-weight: 700; color: var(--accent-2); white-space: nowrap; }
.sys-entry .sys-txt em { font-size: 13px; font-style: normal; color: var(--text-2); }
.sys-entry > .ico { margin-left: auto; width: 15px; height: 15px; color: var(--accent); flex: 0 0 auto; }

.sys-btn .sys-txt em { white-space: nowrap; }

/* 四个坑：限额 + 一句话 */
.side-card-pit { padding-bottom: 18px; }
.pit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pit-list li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.pit-list .pit-k {
  font-size: 15px; font-weight: 700; color: var(--warn);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pit-list span { font-size: 14px; line-height: 1.65; color: var(--text-2); }
.pit-list em { font-style: normal; color: var(--text); font-weight: 600; }

/* 表格单元格不拆短词 */
.spec-row > span { overflow-wrap: break-word; }
.spec-row > span:first-child { white-space: normal; }
.gov-head span { white-space: nowrap; }
.gov-row .gov-note { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .pit-list li { grid-template-columns: 50px minmax(0, 1fr); gap: 8px; }
  .pit-list .pit-k { font-size: 14px; }
}

/* 政采表：列宽下限 + 必要时横向滚动，避免备注被裁 */
.gov-table { overflow-x: auto; }
.gov-row {
  grid-template-columns: 44px minmax(110px, 0.85fr) 58px 128px minmax(180px, 1.3fr) minmax(140px, 1fr);
  min-width: 700px;
}
.gov-note { min-width: 0; }
@media (max-width: 960px) {
  .gov-row { min-width: 0; }
  .gov-table { overflow-x: visible; }
}

/* 对接人：合并后的名册 */
.dir-block { margin-top: 26px; }
.dir-block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dir-block-head h2 { margin: 0; font-size: 17px; color: var(--text); }
.dir-block-head p { margin: 3px 0 0; font-size: 13px; color: var(--text-3); }
.dir-row { grid-template-columns: 168px 148px 118px 124px 96px minmax(0, 1fr); gap: 10px; }
.dir-name small { color: var(--text-3); font-weight: 400; }
.dir-biz { font-size: 13px; }
.dir-biz em, .dir-more em, .dir-tel em { color: var(--text-3); font-style: normal; }
.dir-tel .linkish { font-size: 13px; }
.dir-more { font-size: 12px; line-height: 1.5; color: var(--text-3); }
.dir-row.dir-head { cursor: default; }
.dir-row:not(.dir-head):hover { background: var(--surface-2); }

/* 职责分工 */
.duty-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.duty-block:first-of-type { border-top: 0; padding-top: 0; }
.duty-block h3 { margin: 0 0 8px; font-size: 16px; color: var(--text); }
.duty-lead { margin: 0 0 14px; max-width: 760px; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.duty-group { margin-bottom: 12px; }
.duty-group h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .05em; color: var(--text-3); text-transform: uppercase; }
.duty-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.duty-list li { max-width: 880px; font-size: 13px; line-height: 1.75; color: var(--text-2); }
.duty-list b { display: inline-block; min-width: 92px; color: var(--text); font-weight: 600; }

@media (max-width: 1180px) {
  .dir-row { grid-template-columns: 120px 120px 104px 108px 92px minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .dir-row { grid-template-columns: 104px minmax(0, 1fr) 120px; }
  .dir-row.dir-head span:nth-child(4), .dir-row.dir-head span:nth-child(5), .dir-row.dir-head span:nth-child(6) { display: none; }
  .dir-row:not(.dir-head) > span:nth-child(4), .dir-row:not(.dir-head) > span:nth-child(5), .dir-row:not(.dir-head) > span:nth-child(6) { display: none; }
  .duty-list b { min-width: 0; display: block; }
}

/* 职责分工条目：姓名列固定，职责另起一列 */
.duty-list li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: start; }
.duty-list b { min-width: 0; }
@media (max-width: 560px) {
  .duty-list li { grid-template-columns: 1fr; gap: 2px; }
}

/* 总览：hero 通栏 + 四个坑单独一块 */
.hero.hero-solo { grid-template-columns: 1fr; }
.pit-block { margin-top: 4px; }
.pit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 32px; }
.pit-grid li { padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
@media (max-width: 960px) { .pit-grid { grid-template-columns: 1fr; gap: 8px; } }

/* 参考资料链接行 */
.ref-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 18px 0 0; font-size: 12px; color: var(--text-3); }
.ref-line svg { width: 14px; height: 14px; }
.ref-line a { color: var(--accent-2); text-decoration: none; }
.ref-line a:hover { text-decoration: underline; }

/* 窄屏：政采规则徽标与说明上下排，避免断行 */
@media (max-width: 560px) {
  .gov-row .gov-rule { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* 对接人名册窄屏：两行一条（姓名 + 电话 / 业务另起一行） */
.dir-name small { font-size: 12px; }
@media (max-width: 960px) {
  .dir-row.dir-head { display: none; }
  .dir-row:not(.dir-head) { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; }
  .dir-row:not(.dir-head) .dir-name { grid-area: 1 / 1 / 2 / 2; }
  .dir-row:not(.dir-head) .dir-tel { grid-area: 1 / 2 / 2 / 3; text-align: right; }
  .dir-row:not(.dir-head) .dir-biz { grid-area: 2 / 1 / 3 / 3; color: var(--text-3); }
}

/* 对接人页：职责分工行宽与字号收敛 */
.duty-list li { max-width: 820px; }
.dir-block-head h2 { font-size: 16px; }
.duty-block h3 { font-size: 15px; }

/* 窄屏：踩坑清单单列、提示条标题不断行 */
@media (max-width: 560px) {
  .pit-grid { grid-template-columns: 1fr; }
  .pit-list li { display: block; }
  .pit-list li span { display: block; margin-top: 2px; }
}
.callout h3 { white-space: nowrap; }

/* 窄屏：spec-table 一律改块式，忽略内联列宽 */
@media (max-width: 960px) {
  .spec-table .spec-row { display: block; grid-template-columns: none !important; }
  .spec-table .spec-row > span { display: block; }
  .spec-table .spec-row > span + span { margin-top: 4px; }
  .spec-table .spec-head { display: none; }
  .spec-table .spec-row > span:first-child { font-weight: 600; }
}

/* 资金管理系统五步 */
.sys-step-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.sys-step-list > li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.sys-step-list .step-k { font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: .04em; }
.sys-step-list h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.sys-step-list p { font-size: 13px; line-height: 1.7; color: var(--text-2); margin: 0; }

/* ---------------- 智能问答 ---------------- */
.ask-block { padding: 0; border: 0; background: none; }
.ask-bar { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-1); margin-top: 4px; }
.ask-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.ask-mark { display: flex; color: var(--accent); }
.ask-mark svg { width: 18px; height: 18px; }
.ask-bar input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--text); outline: none; }
.ask-bar input::placeholder { color: var(--text-3); }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ask-chip { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: border-color .18s ease, color .18s ease; }

/* 窄屏：范围与示例改单行横滑，避免首屏被 chips 占掉 3–4 行
   （用 .ai-hero 前缀压过后面的 .ai-scopes 定义，否则 flex-wrap 会被覆盖回去） */
@media (max-width: 560px) {
  .ai-hero .ai-scopes,
  .ai-hero .ask-chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
  }
  .ai-hero .ai-scopes::-webkit-scrollbar,
  .ai-hero .ask-chips::-webkit-scrollbar { display: none; }
  .ai-hero .ai-scope,
  .ai-hero .ask-chip { flex: 0 0 auto; scroll-snap-align: start; }
  /* 右侧渐隐，提示还能横向滑 */
  .ai-hero .ai-scopes,
  .ai-hero .ask-chips {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
  }
  .ai-hero .ai-scopes { margin: 12px 0 0; }
  .ai-hero .ask-chips { margin-top: 8px; }
}
.ask-chip:hover { border-color: var(--accent); color: var(--accent); }
.ask-thread { display: grid; gap: 14px; margin-top: 16px; }
.ask-item { display: grid; gap: 8px; }
.ask-q { justify-self: end; max-width: 78%; padding: 9px 14px; border-radius: 14px 14px 4px 14px; background: var(--accent); color: #fff; font-size: 14px; }
.ask-a { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 14px 16px; }
.ask-a-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ask-a-head svg { width: 16px; height: 16px; color: var(--accent); }
.ask-a-head b { font-size: 14px; color: var(--text); }
.ask-points { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.ask-points li { font-size: 13px; line-height: 1.7; color: var(--text-2); }
.ask-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ask-link { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 3px 10px; border-radius: 8px; background: var(--accent-weak); color: var(--accent-2); font-size: 13px; text-decoration: none; }
.ask-link svg { width: 13px; height: 13px; }
.ask-link:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.ask-contacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
@media (max-width: 560px) {
  .ask-bar { flex-wrap: wrap; }
  .ask-bar input { flex: 1 1 100%; order: 3; padding: 6px 2px; }
  .ask-bar .btn { margin-left: auto; }
  .ask-q { max-width: 92%; }
}

/* 参考资料链接：行内点击区与对比度 */
.ref-line { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 6px 0; }
.ref-line a { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 3px 2px; }
.reim-count { color: var(--text-2); }
@media (max-width: 560px) {
  .ref-line { font-size: 13px; }
}

/* 参考资料行：小屏按行排列 */
.ref-line .ref-label { color: var(--text-3); font-size: 12px; }
.ref-line svg { width: 15px; height: 15px; color: var(--text-3); }
@media (max-width: 560px) {
  .ref-line { display: grid; grid-template-columns: 15px minmax(0, 1fr); gap: 6px 8px; align-items: center; }
  .ref-line .ref-label { grid-column: 2; }
  .ref-line a { grid-column: 2; }
}

/* 系统五步：入口 / 步骤 / 提示 */
.sys-step-list > li { align-items: start; }
.sys-step-list h3 { margin-bottom: 6px; }
.step-in { display: flex; gap: 8px; font-size: 13px; line-height: 1.7; color: var(--text-2); margin: 0 0 8px; }
.step-in span { flex: 0 0 auto; font-size: 12px; color: var(--accent-2); background: var(--accent-weak); border-radius: 6px; padding: 1px 6px; height: 20px; line-height: 18px; }
.step-ol { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.step-ol li { font-size: 13px; line-height: 1.7; color: var(--text-2); }
.step-tip { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: var(--warn-strong, #b45309); }
@media (max-width: 560px) {
  .step-in { flex-direction: column; gap: 4px; }
  .step-in span { width: fit-content; }
}

.step-ol li { display: list-item; }

/* 业务办理须知：分组折叠 */
.rule-group { margin-top: 14px; }
.rule-group-head { font-size: 13px; font-weight: 600; color: var(--text-3); letter-spacing: .04em; margin: 0 0 8px; }
.rule-item { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 8px; overflow: hidden; }
.rule-item > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 14px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); list-style: none; }
.rule-item > summary::-webkit-details-marker { display: none; }
.rule-item > summary:hover { background: var(--surface-2); }
.rule-item .chev { width: 14px; height: 14px; flex: 0 0 auto; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform .18s var(--ease); }
.rule-item[open] .chev { transform: rotate(-135deg); }
.rule-body { padding: 0 14px 12px; }
.rule-body p { font-size: 13px; line-height: 1.75; color: var(--text-2); margin: 0 0 6px; max-width: 92ch; }
.rule-body p:last-child { margin-bottom: 0; }

/* 问答历史 */
.ask-hist-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ask-hist-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 13px; cursor: pointer; }
.ask-hist-btn:hover { border-color: var(--border-strong); color: var(--text); }
.ask-hist-btn .ico { width: 14px; height: 14px; }
.ask-hist-btn em { font-style: normal; font-size: 12px; color: var(--accent-2); background: var(--accent-weak); border-radius: 999px; padding: 0 7px; }
.ask-hist-clear { min-height: 30px; padding: 4px 10px; border: 0; background: none; color: var(--text-3); font-size: 12px; cursor: pointer; }
.ask-hist-clear:hover { color: var(--danger); }
.ask-hist { margin-top: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.ask-hist-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 40px; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--text); font-size: 13px; text-align: left; cursor: pointer; }
.ask-hist-item:last-child { border-bottom: 0; }
.ask-hist-item:hover { background: var(--surface-2); }
.ask-hist-q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-hist-time { flex: 0 0 auto; font-size: 12px; color: var(--text-3); }
.ask-hist-empty { margin: 0; padding: 12px 14px; font-size: 13px; color: var(--text-3); }

/* 搜索面板：模式 + 范围 */
.palette-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.pal-modes { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.pal-mode { min-height: 28px; padding: 3px 12px; border: 0; background: none; color: var(--text-2); font-size: 12px; cursor: pointer; }
.pal-mode.is-active { background: var(--accent-weak); color: var(--accent-2); font-weight: 600; }
.pal-scopes { display: flex; flex-wrap: wrap; gap: 6px; }
.pal-scope { min-height: 26px; padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; background: none; color: var(--text-2); font-size: 12px; cursor: pointer; }
.pal-scope:hover { border-color: var(--border-strong); color: var(--text); }
.pal-scope.is-active { border-color: var(--accent); background: var(--accent-weak); color: var(--accent-2); font-weight: 600; }
.pal-answer { padding: 4px 14px 14px; max-height: 62vh; overflow: auto; }
.pal-answer .ask-item { margin: 0; }
.pal-open { margin-top: 10px; min-height: 32px; padding: 5px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--accent-2); font-size: 13px; cursor: pointer; }
.pal-open:hover { border-color: var(--accent); background: var(--accent-weak); }
.pal-empty-smart { margin-left: 8px; min-height: 26px; padding: 2px 10px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-weak); color: var(--accent-2); font-size: 12px; cursor: pointer; }
.pal-empty-tip { display: block; margin-top: 8px; font-size: 12px; color: var(--text-3); }
@media (max-width: 560px) {
  .palette-tools { padding: 8px 10px; }
  .pal-scopes { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .ask-hist-q { white-space: normal; }
}

/* 隐藏 search 输入框自带的清除按钮（面板已有独立的关闭按钮） */
.palette-input input::-webkit-search-cancel-button,
.palette-input input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.pal-note { margin: 8px 2px 0; font-size: 12px; color: var(--text-3); }

/* 顶栏统一搜索：模式 + 输入 + 语音 */
.top-search {
  flex: 1 1 340px; min-width: 0; max-width: 520px; margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 10px 0 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.top-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.top-mode {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); font-size: 12px; font-weight: 600; cursor: pointer;
}
.top-mode:hover { border-color: var(--border-strong); color: var(--text); }
.top-mode.is-smart { border-color: var(--accent); background: var(--accent-weak); color: var(--accent-2); }
.top-search .search-ico { flex: 0 0 auto; width: 17px; height: 17px; color: var(--text-3); }
.top-search input {
  flex: 1 1 auto; min-width: 0; height: 36px;
  border: 0; background: transparent; color: var(--text); font-size: 14px;
}
.top-search input:focus { outline: none; }
.top-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.top-mic {
  flex: 0 0 auto; display: inline-grid; place-items: center;
  width: 28px; height: 28px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-3); cursor: pointer;
}
.top-mic:hover { background: var(--surface-2); color: var(--text); }
.top-mic .ico { width: 16px; height: 16px; }
.top-mic.is-listening { color: #fff; background: var(--danger); animation: micPulse 1.1s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); } }
.top-search kbd { flex: 0 0 auto; }

/* 搜索面板改为顶栏下拉：贴近顶部、去掉内部输入行与模式行 */
body.top-search-open .palette { padding-top: 76px; }
body.top-search-open .palette-backdrop { background: rgba(8, 15, 26, .35); }
body.top-search-open .palette-input,
body.top-search-open .pal-modes { display: none; }
body.top-search-open .palette-card { max-height: min(72vh, 640px); }
@media (max-width: 560px) {
  .top-search { flex: 1 1 auto; max-width: none; padding: 0 6px; }
  .top-search kbd { display: none; }
  .top-search input { font-size: 13px; }
  body.top-search-open .palette { padding-top: 68px; }
}

/* 下拉贴着顶栏搜索框，右侧对齐 */
body.top-search-open .palette { place-items: start end; padding-right: max(24px, calc((100vw - 1560px) / 2)); }
body.top-search-open .palette-card { width: min(700px, calc(100vw - 48px)); }
.pal-kind-ico { flex: 0 0 auto; width: 16px; height: 16px; color: var(--text-3); }
.pal-recent .pal-body strong { font-weight: 600; }
.pal-sugs { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 10px 10px; }
.pal-sug { min-height: 28px; padding: 3px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 12px; cursor: pointer; }
.pal-sug:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-weak); }
@media (max-width: 960px) {
  body.top-search-open .palette { place-items: start center; padding-right: 0; }
}

/* 第八轮：总览去掉入口条 + 坑区通栏 */
.hero.hero-solo { grid-template-columns: minmax(0, 1fr); }
.pit-block {
  margin: 18px 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 20px 22px 22px;
}
.pit-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pit-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0; }
.pit-head h2 svg { width: 16px; height: 16px; color: var(--warn); }
.pit-head p { margin: 0; font-size: 13px; color: var(--text-3); }
.pit-list.pit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pit-list.pit-grid li { display: block; padding: 14px 14px 12px; background: var(--surface-2); border-radius: var(--radius); }
.pit-list.pit-grid .pit-k { display: block; font-size: 17px; margin-bottom: 6px; }
.pit-list.pit-grid span { font-size: 13px; line-height: 1.7; color: var(--text-2); }
@media (max-width: 1100px) { .pit-list.pit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pit-list.pit-grid { grid-template-columns: minmax(0, 1fr); } }

/* 第九轮：按设计体检逐条收口 */
.crumb .sep { opacity: 1; color: var(--text-2); }

/* 总览：flow 卡片副标题与步骤不再挤断 */
.flow-head p { font-size: 12px; }
.flow-steps li { font-size: 13px; line-height: 1.65; }

/* 坑区 4 列：标签降到 16px，去掉单独一档字号 */
.pit-list.pit-grid .pit-k { font-size: 16px; }

/* 采购参数表：放宽列宽并允许金额列不折 */
.spec-table .spec-row > span { min-width: 0; }
.spec-table.reim-table .spec-row { grid-template-columns: 170px minmax(0, 1fr); }

/* 政采目录：备注列加宽 */
.gov-row { grid-template-columns: 44px minmax(120px, 170px) 58px 130px minmax(210px, 1.1fr) minmax(170px, 1.05fr); }

/* 报销页系统五步：行长收口 */
.step-ol li { max-width: 46ch; }
#finSystem .note-line, .note-line { max-width: 78ch; }

/* 耗材须知正文：行长收口（折叠时不影响布局） */
.rule-body p { max-width: 62ch; }

/* 名册：房间与并列姓名不折 */
.dir-row .dir-room, .dir-row > span:nth-child(4) { white-space: nowrap; }
.dir-name small { white-space: nowrap; }
@media (min-width: 961px) {
  .dir-row { grid-template-columns: 168px 150px 122px 176px 96px minmax(0, 1fr); }
}

/* 须知卡片：改为 button + hidden，折叠态不参与布局测量 */
.rule-item > .rule-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 10px 14px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); text-align: left; }
.rule-item > .rule-sum:hover { background: var(--surface-2); }
.rule-item.is-open > .rule-sum { border-bottom: 1px solid var(--border); }
.rule-body[hidden] { display: none; }

/* 窄屏：入口条标题与提示条按钮不撑破容器 */
.sys-entry .sys-txt { min-width: 0; }
.sys-entry .sys-txt b { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .callout { flex-wrap: wrap; }
  .callout > a.btn, .callout > button.btn { flex: 0 0 auto; margin-left: 0; }
  .sys-entry { align-items: flex-start; }
}

/* 报销材料要点：行长收口 */
.reim-keys li { max-width: 46ch; }

.pit-list.pit-grid span { display: block; }

/* 坑区：标题行 + 说明段，说明段正常换行 */
.pit-list.pit-grid .pit-t { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 4px; }
.pit-list.pit-grid p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--text-2); }
.pit-list.pit-grid span { display: block; }

/* 第十轮：居中 AI 卡（参考 AI 搜索首页） */
.ai-hero {
  max-width: 940px;
  min-width: 0;
  width: 100%;
  margin: 26px auto 30px;
  padding: 0 4px;
  text-align: center;
}
.ai-eyebrow { margin: 0 0 10px; font-size: 12px; letter-spacing: .06em; color: var(--accent-2); }
.ai-title { margin: 0 0 8px; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.25; }
.ai-sub { margin: 0 auto 20px; max-width: 640px; font-size: 14px; line-height: 1.75; color: var(--text-2); }

.ai-box {
  margin: 0 auto;
  max-width: 860px;
  background: var(--surface);
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 18px;
  box-shadow: var(--shadow-2);
  padding: 16px 18px 14px;
  text-align: left;
}
.ai-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak), var(--shadow-2); }
.ai-input-row { display: flex; align-items: center; gap: 10px; }
.ai-mark { display: inline-flex; color: var(--accent-2); flex: 0 0 auto; }
.ai-mark svg { width: 18px; height: 18px; }
.ai-input-row input {
  flex: 1 1 auto; min-width: 0; border: 0; background: none; padding: 8px 0;
  font: inherit; font-size: 16px; color: var(--text); outline: none;
}
.ai-input-row input::placeholder { color: var(--text-3); }

.ai-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.ai-modes { display: inline-flex; gap: 6px; padding: 3px; background: var(--surface-2); border-radius: 999px; }
.ai-mode {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--text-2);
}
.ai-mode svg { width: 14px; height: 14px; }
.ai-mode:hover { color: var(--text); }
.ai-mode.is-on { background: var(--accent); color: #fff; }
.ai-actions { display: inline-flex; align-items: center; gap: 8px; }
.ai-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
}
.ai-icon svg { width: 17px; height: 17px; }
.ai-icon:hover { color: var(--text); border-color: var(--border-strong, var(--border)); }
.ai-icon.is-listening { color: #fff; background: var(--danger); border-color: var(--danger); animation: micPulse 1.1s ease-in-out infinite; }
.ai-go {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff;
}
.ai-go svg { width: 18px; height: 18px; }
.ai-go:hover { filter: brightness(1.06); }

.ai-scopes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px auto 0; max-width: 860px; width: 100%; min-width: 0; }
.ai-scope {
  height: 30px; padding: 0 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  font: inherit; font-size: 13px;
}
.ai-scope:hover { color: var(--text); border-color: var(--border-strong, var(--border)); }
.ai-scope.is-on { background: var(--accent-weak); border-color: var(--accent); color: var(--accent-2); font-weight: 600; }

.ai-hero .ask-chips { justify-content: center; margin-top: 12px; }
.ai-hero .ask-hist-bar { justify-content: center; margin-top: 10px; }
/* 问答卡片与输入框同宽（860），宽屏下不会拉成一条、每行也不会只剩半行 */
.ai-hero .ask-thread { text-align: left; margin-top: 18px; max-width: 860px; margin-left: auto; margin-right: auto; }
.ask-a { padding: 16px 18px; }
.ask-points li { font-size: 13.5px; line-height: 1.8; }

/* 快速模式结果 */
.ask-scope-tag { margin-left: 8px; font-style: normal; font-size: 12px; color: var(--text-3); }
.ask-hits { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ask-hit {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border-radius: 10px; background: var(--surface-2); color: inherit; text-decoration: none;
}
.ask-hit:hover { background: var(--surface-3, var(--surface-2)); }
.ask-hit-kind { flex: 0 0 auto; font-size: 12px; color: var(--accent-2); background: var(--accent-weak); border-radius: 6px; padding: 2px 6px; }
.ask-hit-body { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.ask-hit-body b { font-size: 13px; color: var(--text); }
.ask-hit-body i { font-style: normal; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-hit svg { flex: 0 0 auto; width: 14px; height: 14px; color: var(--text-3); margin-top: 4px; }
.ask-empty { margin: 6px 0 0; font-size: 13px; color: var(--text-3); }

/* 问答区：范围筛选收进「筛选」按钮，首屏只留示例 */
.ai-filter-row { display: flex; justify-content: center; margin: 12px auto 0; max-width: 860px; }
.ai-filter {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 999px; border: 1px dashed var(--border-strong, var(--border));
  background: transparent; color: var(--text-3); font: inherit; font-size: 12.5px; cursor: pointer;
}
.ai-filter em { font-style: normal; color: var(--accent-2); font-weight: 600; }
.ai-filter svg { width: 13px; height: 13px; }
.ai-filter .ico:last-child { transition: transform .16s ease; }
.ai-filter.is-open .ico:last-child { transform: rotate(180deg); }
.ai-filter:hover { color: var(--text-2); border-color: var(--accent); }
.ai-filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ai-scopes[hidden] { display: none; }

@media (max-width: 560px) {
  .ai-hero { margin-top: 12px; }
  .ai-box { padding: 12px 14px 12px; border-radius: 14px; }
  .ai-input-row input { font-size: 15px; }
  .ai-mode { height: 44px; padding: 0 14px; font-size: 13px; }
  .ai-icon { width: 44px; height: 44px; }
  .ai-go { width: 48px; height: 48px; }
  .ai-scopes { gap: 8px; }
  .ai-scope { height: 44px; padding: 0 16px; font-size: 13.5px; }
  .ai-filter { height: 44px; padding: 0 16px; font-size: 13px; }
  /* 示例标签改成换行铺满，不再横向滑动被切掉 */
  .ai-hero .ask-chips {
    flex-wrap: wrap; overflow: visible; justify-content: center;
    margin: 10px auto 0; padding-bottom: 0;
    -webkit-mask-image: none; mask-image: none;
  }
  .ask-chip { height: 44px; padding: 0 16px; font-size: 13.5px; }
  .ask-link { min-height: 44px; padding: 0 14px; }
  .form-dl { min-height: 44px; font-size: 13.5px; }
  .chip { height: 44px; }
}

/* 内测口令门 */
.gate {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 24px;
  background: radial-gradient(1200px 600px at 50% 0%, rgba(3,105,161,.22), transparent 60%), var(--bg);
}
body.is-gated { overflow: hidden; }
.gate-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  padding: 26px 26px 22px;
}
.gate-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.gate-brand .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; }
.gate-brand b { display: block; font-size: 14px; color: var(--text); }
.gate-brand em { font-style: normal; font-size: 12px; color: var(--text-3); }
.gate-card h1 { margin: 0 0 6px; font-size: 20px; }
.gate-card > p { margin: 0 0 16px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.gate-card form { display: grid; gap: 10px; }
.gate-card input[type="password"] {
  height: 44px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 14px;
}
.gate-card input[type="password"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.gate-card .btn { height: 44px; justify-content: center; }
.gate-hint { margin: 10px 0 0; font-size: 12px; min-height: 16px; color: var(--text-3); }
.gate-hint.is-bad { color: var(--danger); }
.gate-keep { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--text-2); }
.gate-keep input { accent-color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 本地只读预览提示（auth.js 注入） */
.offline-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 80; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; max-width: min(420px, calc(100vw - 32px)); padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); box-shadow: var(--shadow-2); font-size: 12px; color: var(--text-2); }
.offline-bar b { color: var(--text); font-size: 12px; }
.offline-bar span { color: var(--text-3); }
body.has-offline .main,
body.has-offline #simpleRoot { padding-bottom: 64px; }

.gate[hidden] { display: none !important; }
.gate-keep { min-height: 24px; }
.gate-keep input { width: 18px; height: 18px; }

/* 第十一轮：顶栏搜索下线后，面板恢复居中弹层 */
body.top-search-open .palette { place-items: center; }
.palette .palette-input { display: flex !important; }
.palette .palette-tools { display: flex; }

/* 对比度：浅色底上的模式胶囊用深字 */
[data-theme="light"] .ai-mode.is-on, html:not([data-theme="dark"]) .ai-mode.is-on { background: var(--accent); color: #fff; }
[data-theme="dark"] .ai-mode.is-on { background: var(--accent); color: #06202e; }
[data-theme="dark"] .ai-go { color: #06202e; }

/* 字号收敛 */
.ai-title { font-size: clamp(24px, 2.2vw, 30px); }

/* 名册列宽与长文本 */
@media (min-width: 1100px) {
  .dir-row { grid-template-columns: 152px 142px 108px minmax(150px, 1fr) 92px minmax(230px, 1.35fr); gap: 12px; }
}
.dir-row .dir-room, .dir-row > span:nth-child(4) { white-space: normal; overflow-wrap: anywhere; }
.dir-row.dir-head span { white-space: nowrap; }
.dir-more { white-space: normal; overflow-wrap: anywhere; }
.dir-more em { white-space: nowrap; }
.dir-row .mail-link { display: inline-flex; align-items: center; min-height: 26px; }
.dir-name small { white-space: normal; }

/* 采购参数表：窄栏位也不折行 */
.spec-table .spec-row { font-size: 13px; }
@media (min-width: 1100px) { .spec-table .spec-row { font-size: 13px; } }

/* 名册：961–1280 两行卡片式，避免 6 列互挤 */
@media (max-width: 1280px) and (min-width: 961px) {
  .dir-row { grid-template-columns: 150px minmax(0, 1fr) 168px; gap: 4px 14px; align-items: baseline; }
  .dir-row.dir-head { display: none; }
  .dir-row > span:nth-child(1) { grid-column: 1; grid-row: 1; }
  .dir-row > span:nth-child(2) { grid-column: 2; grid-row: 1; }
  .dir-row > span:nth-child(3) { grid-column: 3; grid-row: 1; text-align: right; }
  .dir-row > span:nth-child(4) { grid-column: 1; grid-row: 2; font-size: 12px; color: var(--text-3); }
  .dir-row > span:nth-child(5) { grid-column: 2; grid-row: 2; font-size: 12px; color: var(--text-3); }
  .dir-row > span:nth-child(6) { grid-column: 3; grid-row: 2; text-align: right; }
  .dir-row .dir-more br { display: none; }
  .dir-row .dir-more { display: flex; flex-direction: column; align-items: flex-end; }
}

/* 采购事前申请表：首列文案较长，单独给足宽度并允许略缩字号 */
@media (min-width: 1200px) {
  #p-1-0 .spec-table .spec-row { grid-template-columns: minmax(196px, 1fr) minmax(126px, 0.7fr) minmax(190px, 1.35fr) !important; }
}

/* 金额判断器：两栏布局 + 采购建议 */
.calc-card { width: min(1080px, 94vw); }
.calc-grid { display: grid; grid-template-columns: 336px minmax(0, 1fr); gap: 0; align-items: stretch; }
.calc-grid .calc-form { display: grid; gap: 14px; align-content: start; }
.calc-grid .calc-form .field { margin: 0; }
.calc-advice { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.calc-advice-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.calc-advice-h .ico { width: 16px; height: 16px; color: var(--ok); }
.calc-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.calc-steps li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.calc-step-no { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-weak); color: var(--accent-2); font-size: 12px; line-height: 18px; text-align: center; }
.calc-step-t { min-width: 0; }
.calc-step-link { margin-left: auto; font-size: 12px; color: var(--accent-2); text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--accent-2) 45%, transparent); padding-bottom: 1px; white-space: nowrap; }
.calc-step-link:hover { color: var(--accent); }
.calc-card .modal-body { align-items: stretch; }
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; gap: 16px; }
  .calc-card { width: min(680px, 94vw); }
}

.calc-step-link { display: inline-flex; align-items: center; min-height: 26px; padding: 0 2px; }

/* 采购组织形式对比 + 六种实施流程 */
.org-table { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.org-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 12px 16px; border-top: 1px solid var(--border); align-items: start; }
.org-row:first-child { border-top: 0; }
.org-row.org-head { background: var(--surface-2); align-items: center; }
.org-row > span { font-size: 12px; font-weight: 650; color: var(--text-3); letter-spacing: .03em; }
.org-row > b { font-size: 14px; color: var(--text); }
.org-row > p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--text-2); }
.flow-card { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 18px 20px; }
.flow-card-head h3 { margin: 0 0 8px; font-size: 16px; }
.flow-when { margin: 0 0 4px; font-size: 13px; line-height: 1.7; color: var(--text-2); }
.flow-when b { display: inline-block; min-width: 62px; color: var(--text-3); font-weight: 650; font-size: 12px; }
@media (max-width: 760px) {
  .org-row { grid-template-columns: 1fr; gap: 4px; }
  .org-row > span { color: var(--text-3); }
}

/* 流程图（垂直节点 + 连接线） */
.fd-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 4px; font-size: 12px; color: var(--text-3); }
.fd-lg { display: inline-flex; align-items: center; gap: 6px; }
.fd-lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fd-lg-dot { background: var(--accent); }
.fd-lg-dia { background: var(--warn, #d97706); transform: rotate(45deg); border-radius: 2px; }
.fd-lg-note { background: var(--border-strong); }

.fd { list-style: none; margin: 10px 0 6px; padding: 0 0 0 22px; position: relative; }
.fd::before { content: ''; position: absolute; left: 33px; top: 12px; bottom: 18px; width: 2px; background: linear-gradient(180deg, var(--border-strong), var(--border)); border-radius: 2px; }
@media (max-width: 560px) {
  .fd { padding-left: 10px; }
  .fd::before { left: 22px; }
}
.fd::before { background: var(--border-strong); opacity: .55; }
@media (max-width: 560px) { }

/* 建账四步条 */
.flow-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 4px; }
.flow-strip > div { position: relative; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.flow-strip > div > b { display: block; font-size: 13px; color: var(--text); margin-bottom: 4px; }
.flow-strip > div > span { font-size: 12px; line-height: 1.6; color: var(--text-3); display: block; }
.flow-strip > div:not(:last-child)::after {
  content: '›'; position: absolute; right: -9px; top: 50%; transform: translateY(-50%);
  color: var(--border-strong); font-size: 18px; line-height: 1;
}
@media (max-width: 760px) { .flow-strip { grid-template-columns: 1fr 1fr; } .flow-strip > div::after { display: none; } }
@media (max-width: 420px) { .flow-strip { grid-template-columns: 1fr; } }

.flow-strip { margin: 4px 0 16px; }
.flow-strip > div:not(:last-child)::after { right: -12px; z-index: 2; font-weight: 700; }

/* 材料数量条形图 */
.chart-block { margin-top: 8px; }
.bar-chart { list-style: none; margin: 10px 0 6px; padding: 0; display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 62px; align-items: center; gap: 12px;
  width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; cursor: pointer; text-align: left; }
.bar-row:hover, .bar-row:focus-visible { background: var(--surface-2); border-color: var(--border); }
.bar-name { font-size: 13px; color: var(--text); white-space: nowrap; }
.bar-track { height: 10px; border-radius: 6px; background: var(--surface-3, rgba(148,163,184,.18)); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2, #38bdf8)); }
.bar-num { font-size: 12px; color: var(--text-3); text-align: right; white-space: nowrap; }
.chart-note { margin: 6px 0 0; font-size: 12px; color: var(--text-3); }
@media (max-width: 560px) {
  .bar-row { grid-template-columns: 92px minmax(0, 1fr) 52px; gap: 8px; padding: 7px 6px; }
  .bar-name { font-size: 12px; }
}

.reim-body.is-flash { box-shadow: 0 0 0 2px var(--accent); transition: box-shadow .3s ease; }

/* 条形图窄屏不溢出 + 字号收敛 */
@media (max-width: 560px) {
  .bar-row { grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr) 46px; grid-template-areas: "name name name num" "track track track track"; row-gap: 6px; }
  .bar-name { grid-area: name; white-space: normal; overflow-wrap: anywhere; }
  .bar-track { grid-area: track; }
  .bar-num { grid-area: num; }
}
.spec-table .spec-row { font-size: 13px; }

/* 流程图（重绘）：编号轨 + 居中框 + 右侧条件框 */
.fl { list-style: none; margin: 0 auto; padding: 4px 0 0; max-width: 1000px; display: grid; gap: 26px; }
.fl-step { display: grid; grid-template-columns: 34px minmax(0, 540px) minmax(0, 1fr); column-gap: 14px; align-items: center; position: relative; }
.fl-no { grid-column: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--accent-2); background: var(--accent-weak); align-self: center; }
.fl-box { grid-column: 2; position: relative; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 11px 16px; box-shadow: var(--shadow-1); }
.fl-box p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text); }
.fl-step:not(:last-child) .fl-box::after { content: '▾'; position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); font-size: 13px; color: var(--text-3); line-height: 1; }
.fl-step.is-branch .fl-box { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); }
.fl-step.is-branch .fl-no { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); border-radius: 6px; }
.fl-tag { position: absolute; right: 10px; top: -9px; font-size: 11px; font-style: normal; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 40%, var(--border)); }
.fl-note { grid-column: 3; position: relative; margin-left: 26px; border: 1px dashed var(--border-strong); border-radius: 8px; padding: 8px 12px; font-size: 13px; line-height: 1.6; color: var(--text-2); background: var(--surface-2); }
.fl-note span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.fl-note::before { content: ''; position: absolute; left: -27px; top: 50%; width: 26px; border-top: 1px dashed var(--border-strong); }
@media (max-width: 900px) {
  .fl-step { grid-template-columns: 30px minmax(0, 1fr); }
  .fl-note { grid-column: 2; margin: 6px 0 0; }
  .fl-note::before { display: none; }
}

.fl-step:not(:last-child) .fl-box::after { font-size: 17px; bottom: -25px; color: var(--border-strong); }
.fl-note::before { border-top-color: var(--border-strong); }
.fl-note::after { content: ''; position: absolute; left: -4px; top: calc(50% - 2px); width: 5px; height: 5px; border-radius: 50%; background: var(--border-strong); }
.fd-lg-count { color: var(--text-3); }

/* 流程图：贴近学校流程框图的观感 */
.fl { max-width: 1020px; }
.fl-box { min-height: 46px; display: flex; align-items: center; padding: 10px 16px; border-radius: 6px; background: var(--surface); border: 1.5px solid var(--border-strong); box-shadow: none; font-size: 14px; }
.fl-step:first-child .fl-box, .fl-step:last-child .fl-box { border-radius: 6px; }
.fl-step.is-branch .fl-box { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.fl-step:not(:last-child) .fl-box::after { content: ''; position: absolute; left: 50%; bottom: -22px; width: 10px; height: 10px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: translateX(-50%) rotate(45deg); font-size: 0; }
.fl-step::before { background: var(--accent); opacity: .45; }
.fl-no { border: 1.5px solid var(--accent); color: var(--accent); background: var(--surface); font-weight: 600; }
.fl-step.is-branch .fl-no { border-color: var(--warn); color: var(--warn); }
.fl-note { background: transparent; border: 1px dashed var(--violet); color: var(--text-2); }
.fl-note::before { border-top-color: var(--violet); }
.fl-note::after { background: var(--violet); }
.fl-tag { background: var(--warn); color: #3b2405; }

/* ---- 第十六轮：对比度 / 字号 / 提前换行 ---- */
.ask-q, .ask-q span { color: #06202e; }
[data-theme="dark"] .ask-q, [data-theme="dark"] .ask-q span { color: #06202e; }
.fl-note span, .fl-tag { font-size: 12px; line-height: 1.5; }
.fact-v { white-space: normal; overflow-wrap: anywhere; }
.fact { min-width: 0; }
.hero-main .lede, .hero-solo .lede, .ai-sub { max-width: none; }
.hero-main { padding: 26px 30px 24px; }
.reim-table { grid-template-columns: 190px minmax(0, 1fr); }
.reim-keys li, .reim-table li { max-width: none; }
.ask-hist, #askHist { max-height: 260px; overflow: auto; }
html { font-size: 16px; }
h1, .page-head h1, .hero-main h1, .ai-title { font-size: clamp(24px, 2.1vw, 30px); }
h2, .block-head h2 { font-size: 20px; }


/* 第十六轮补：分支徽标与标题字号 */
.fl-tag { background: var(--warn); color: #ffffff; }
.fl-step.is-branch .fl-no { color: #8a3f06; border-color: #8a3f06; }
h1, .page-head h1, .hero-main h1 { font-size: 28px; }
@media (max-width: 1100px) { h1, .page-head h1, .hero-main h1 { font-size: 26px; } }
@media (max-width: 560px) { h1, .page-head h1, .hero-main h1 { font-size: 24px; } }
.ai-title { font-size: 28px; }
@media (max-width: 1100px) { .ai-title { font-size: 26px; } }


/* ---- 专业科技风格 ---- */
body, button, input, select, textarea { font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif; }
h1, h2, h3, .hero-main h1, .ai-title { font-weight: 600; letter-spacing: -.01em; }
.num, .hero-num, .stat-v, .bar-num, table, .spec-row, .dir-more { font-variant-numeric: tabular-nums; }
.mini-row, .dir-row, .field-row { min-height: 44px; }
.badge-ok, .badge-warn { border-radius: 999px; }

/* 专业科技风格：对比度与点击区微调 */
:root { --text-3: #5D6B80; }
.gate-keep input { width: 24px; height: 24px; }
.gate-brand em, .gate-brand span { color: var(--text-2); }

/* 报销直达 chips + 五件事行长 */
.jump-block .jump-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.jump-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.jump-chip:hover { border-color: var(--accent); box-shadow: 0 1px 3px rgba(36,87,245,.12); }
.jump-chip .jump-no { width: 20px; height: 20px; border-radius: 6px; background: var(--accent-weak); color: var(--accent); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.jump-chip em { font-style: normal; color: var(--text-2); font-size: 13px; }
.step-ol li, .sys-step-list .step-ol li { max-width: none; }
.sys-step-list > li { max-width: none; }

/* 左侧栏二级目录（随当前模块展开） */
.nav-item { position: relative; }
.nav-caret { position: absolute; right: 12px; top: 16px; font-size: 11px; color: var(--side-text-dim); transition: transform .18s; pointer-events: none; }
.nav-item.is-open .nav-caret { transform: rotate(180deg); color: var(--side-text-strong); }
.subnav { list-style: none; margin: 2px 0 8px 34px; padding: 0 6px 0 10px; border-left: 1px solid var(--side-line); display: none; }
.nav-item.is-open .subnav { display: block; }
.subnav-link { display: block; width: 100%; text-align: left; padding: 5px 6px; margin: 1px 0; border: 0; border-radius: 6px; background: none; color: var(--side-text-dim); font: inherit; font-size: 12.5px; line-height: 1.45; cursor: pointer; }
.subnav-link:hover { color: var(--side-text-strong); background: var(--side-hover-bg); }
.subnav-link.is-active { color: var(--side-active-text); background: var(--side-active); }
@media (max-width: 960px) { .subnav { display: none !important; } .nav-caret { display: none; } }

.subnav-link { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nav-caret { top: 20px; right: 10px; }

/* 二级目录与浅色对比度收尾 */
.nav-caret { font-size: 12px; }
.sidebar .doc-link, .sidebar .doc-link span { color: #C7D2E2; }
[data-theme="light"] .ai-eyebrow,
html:not([data-theme="dark"]) .ai-eyebrow { color: #0B6E6D; }
[data-theme="light"] .ai-scope.is-on,
html:not([data-theme="dark"]) .ai-scope.is-on { color: #0B4A9B; }
[data-theme="light"] .ask-hist-btn em,
html:not([data-theme="dark"]) .ask-hist-btn em { color: #0B4A9B; }
.subnav-link { font-size: 13px; }


/* 侧栏底色跟随主题（浅色白 / 深色深蓝） */
.sidebar { background-color: var(--side-bg); background-image: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%); color: var(--side-text); }
.subnav-link { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#sidebar, #sidebar.sidebar { background-color: var(--side-bg); background-image: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%); color: var(--side-text); }
#sidebar .doc-link, #sidebar .doc-link span { color: var(--side-text); }
#nav a em { color: var(--side-text-dim); }
#nav a span { color: var(--side-text-strong); }

/* ===== 第十九轮：问题清单修复 ===== */
:root { --border-control: #8B99AD; --accent-ink: #FFFFFF; }
[data-theme="dark"] { --border-control: #4A5F7C; --accent: #6E8CFF; --accent-2: #9DB2FF; --accent-line: #2B3F7A; --accent-ink: #071022; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #1E46D6; }
.brand-mark { background: var(--accent); color: var(--accent-ink); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.nav a.is-active::before { background: var(--accent); }
.nav a.is-active .ico { color: #9DB2FF; }
.ai-scope, .ai-mode, .ask-chip, .chip, .pal-scope, .pal-mode, .btn-ghost, .rule-item, .ask-hist-btn, .calc-step-link { border-color: var(--border-control); }
.badge-gov { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 12px; font-style: normal; line-height: 1; white-space: nowrap; }
.gov-row .gov-rule { background: transparent; padding: 0; border-radius: 0; }
.rule-item.is-open > .rule-sum .chev { transform: rotate(-135deg); }
.topbar-actions { margin-left: auto; }
.flash { animation: flashBg 1.6s ease; }
@keyframes flashBg { 0% { background: var(--accent-weak); } 100% { background: transparent; } }
/* 段落呼吸感：模块之间、模块内部小节之间留白更松 */
.block, section.block { margin-top: 40px; }
.page-head + .block, .page-head + section.block { margin-top: 32px; }
.block-head { margin-bottom: 18px; }
.block-head.compact { margin-bottom: 14px; }
.stage + .stage, .field-group + .field-group { margin-top: 28px; }
.reim-body { margin-top: 34px; }
.ai-hero + .block { margin-top: 44px; }
@media (max-width: 560px) {
  .block, section.block { margin-top: 30px; }
  .reim-body { margin-top: 26px; }
}
@media (max-width: 960px) { .topbar-actions { margin-left: auto; } }


/* 极简版：顶部那条窄栏不需要，交给 simpleRoot 内的切换按钮 */
body.mode-simple .topbar { display: none; }
/* toolbar 的「极简版」按钮与 simpleToggle 重复，保留一个 */
:root { --warn-strong: #8a3f06; }
[data-theme="dark"] { --warn-strong: #f0b27a; }


/* 二级目录 / 深链接：滚动后用 96px 让出顶栏，标题完整可见 */
#view section.block, #view .block, #view .reim-body, #view .stage, #view .field-group { scroll-margin-top: 96px; }
.gate-alt { margin-top: 14px; display: grid; gap: 10px; }
.gate-alt-btn { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; text-align: left; padding: 0; }
.gate-alt-form { display: grid; gap: 8px; }
.gate-alt-form[hidden] { display: none; }
.gate-alt-form input { height: 44px; border: 1px solid var(--border-control, var(--border)); border-radius: 8px; background: var(--surface-2); color: var(--text); padding: 0 12px; font: inherit; font-size: 15px; }


/* 采购页：阶段卡一行一张，按编号顺序，不再左侧单列留白 */
.stage-stack { display: grid; gap: 20px; margin-top: 20px; }
.stage-stack .stage { margin: 0; }
.stage-stack .stage-wide { width: 100%; }


/* 总览：各模块统一背景框 */
#view.overview section.block > .block-head, #view.overview > section.block { }
body[data-view="overview"] #view section.block,
#view > section.block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
}
#view > section.block.mode-plain { background: transparent; border: 0; padding: 0; }
/* 历史记录列表给一层底 */
.ask-hist-list, .ask-hist { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; }
.ask-hist-row + .ask-hist-row { border-top: 1px solid var(--border); }

/* 顶栏：图标与主操作之间加分隔 */
.topbar-actions #searchBtn { margin-right: 2px; }
.topbar-actions #calcBtn { margin-right: 4px; }

/* 搜索面板：模式与范围分区 */
.palette-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pal-modes { flex: 0 0 auto; }
.pal-scopes { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
@media (max-width: 720px) { .pal-scopes { justify-content: flex-start; } }


/* ===== 第二十五轮：品牌、左下角元信息、侧栏不被挤出 ===== */
.side { display: flex; flex-direction: column; min-height: 100%; }
#nav, .nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.side-foot, .side-sync { flex: 0 0 auto; }
.side-sync { margin-top: auto; }
.side-sync p { margin: 2px 0; font-size: 12px; line-height: 1.6; color: var(--side-text-dim); }
.side-sync b { color: var(--side-text-strong); font-weight: 600; }


/* 左下角元信息三行：数据同步 / 版本更新 / 开发者
   只在这里定义一次，颜色全部走 token（原先 .sync 有 4 处覆盖，改 token 不生效） */
.meta-list {
  margin: 0; padding: 0 4px;
  display: grid; gap: 3px;
  font-size: 11.5px; line-height: 1.55;
}
.meta-list > div { display: flex; gap: 8px; align-items: baseline; }
.meta-list dt {
  flex: 0 0 56px; white-space: nowrap;
  color: var(--side-text-dim);
}
.meta-list dd {
  margin: 0; color: var(--side-text);
  font-variant-numeric: tabular-nums;
}
.sync-note { margin: 8px 0 0; padding: 0 4px; font-size: 11px; line-height: 1.6; color: var(--side-text-dim); opacity: .78; }
.sidebar-foot { padding-bottom: 14px; }
.gate-ver { margin: 10px 0 0; font-size: 12px; color: var(--text-3); }
.smp-meta { margin: 6px 0 0; font-size: 12px; color: var(--text-3); }


/* 顶栏工具：清晰分区 */
.topbar-actions { gap: 8px; }
.topbar-actions .btn-ghost { white-space: nowrap; }


/* 吐槽·框选标注 */
.fang-mode-btn { margin-left: 8px; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border-control); background: transparent; color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; }
.fang-mode-btn.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.fang-rect-on #view { cursor: crosshair; }
.fang-rect-ghost { position: fixed; z-index: 9998; border: 1.5px dashed var(--accent); background: rgba(36,87,245,.10); border-radius: 4px; pointer-events: none; }
.fang-rect-tag { display: inline-block; margin-left: 6px; padding: 0 6px; height: 18px; line-height: 18px; border-radius: 4px; background: var(--accent-weak); color: var(--accent); font-size: 11px; }


/* 吐槽落点与颜色 */
.fang-pin { position: absolute; z-index: 9997; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 999px; border: 2px solid #fff; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(15,23,42,.30); }
.fang-colors { display: flex; gap: 8px; margin: 8px 0 4px; }
.fang-color { width: 22px; height: 22px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; }
.fang-color[data-on] { border-color: var(--text); }

/* ===== 第三十轮：暗色对比度与排版修补 ===== */
[data-theme="dark"] {
  --text-3: #93A3BA;
  --accent: #4462DE;
}
.ask-scope-tag { color: #fff; background: rgba(255,255,255,.20); padding: 1px 6px; border-radius: 6px; }
/* 问答正文跟随卡片宽度，不再限 48ch（宽屏下会把每行截掉一半，看着像断行） */
.ask-points li { max-width: none; }
.reim-keys li { max-width: 62ch; }
.sidebar-foot { position: relative; z-index: 2; background: var(--side-bg); padding-top: 10px; }
.side { overflow: hidden; }
#nav, .nav { padding-bottom: 6px; }
.smp-v a, .smp-out a { white-space: nowrap; }
.smp-search-ico { color: var(--text-2); }

/* ===== 第三十轮（补）：暗色流程图与侧栏滚动 ===== */
#nav { max-height: calc(100vh - 280px); overflow-y: auto; }
[data-theme="dark"] .fl-no { color: #9DB2FF; border-color: #3A4E8F; }
[data-theme="dark"] .fl-step.is-branch .fl-no { color: #FBBF24; border-color: #B45309; }
[data-theme="dark"] .fl-tag { background: #FBBF24; color: #3B2405; }

/* ===== 第三十轮（三）：暗色标题、跳转徽标、侧栏底栏定位 ===== */
[data-theme="dark"] .item-head h3, [data-theme="dark"] .stage h2, [data-theme="dark"] h3 { color: var(--text); }
[data-theme="dark"] .jump-chip .jump-no { color: #9DB2FF; }
.sidebar-foot { position: static !important; margin-top: 14px !important; flex: 0 0 auto; }
.side { display: flex; flex-direction: column; height: 100vh; }
#nav, .nav { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }

/* ===== 第三十轮（四）：侧栏滚动区到底 ===== */
#nav, .nav { max-height: calc(100vh - 300px) !important; overflow-y: auto !important; }
.sidebar-foot { background: transparent; border-top: 0; padding-top: 12px; }

/* ===== 第三十轮（五）：暗色文字主色可读性 ===== */
[data-theme="dark"] {
  --accent-ink: #FFFFFF;
  --accent-text: #9DB2FF;
}
[data-theme="dark"] a:not(.btn):not(.chip):not(.smp-btn),
[data-theme="dark"] .flow-link,
[data-theme="dark"] .quick-url,
[data-theme="dark"] .subnav-link,
[data-theme="dark"] .ref-link { color: var(--accent-text); }
[data-theme="dark"] .ai-mode.is-on { color: #FFFFFF; }
#nav, .nav { max-height: calc(100vh - 330px) !important; }


/* ===== 门禁：姓名 + 工号 + 手机号 ===== */
.gate-person-form { display: grid; gap: 12px; margin-top: 4px; }
.gate-field { display: grid; gap: 6px; }
.gate-field > span { font-size: 13px; color: var(--text-2); }
.gate-field input { height: 44px; border: 1px solid var(--border-control); border-radius: 8px; padding: 0 12px; font: inherit; font-size: 15px; background: var(--surface); color: var(--text); }
.gate-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.gate-go { width: 100%; height: 44px; margin-top: 4px; }
.gate-switch { background: none; border: 0; padding: 6px 0; color: var(--text-2); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.gate-hint.is-bad { color: var(--danger); }


/* ===== 第三十三轮：吐槽入口贴左下角（无背景块） ===== */
.fang-trail, .fang-panel { border-radius: 12px; }
.sidebar-foot { flex: 0 0 auto; }
.side { overflow: hidden; }
.nav, #nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; max-height: none !important; }


/* 暗色：提问气泡、范围标签、徽标 */
.ask-q, .ask-q span { color: #FFFFFF; }
[data-theme="dark"] .ask-scope-tag { background: rgba(255,255,255,.92); color: #1B2A5C; }
[data-theme="dark"] .badge-blue,
[data-theme="dark"] .badge-type-opt { color: var(--accent-text); background: rgba(157,178,255,.14); }



/* 右下角吐槽浮钮（原来贴左下，压住侧栏底部的版本行与移动端内容） */
#fangBtn { display: none !important; }
.fang-fab {
  position: fixed; right: 18px; bottom: 18px; left: auto; z-index: 90;
  width: 44px; height: 44px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-control); background: var(--surface); color: var(--text-2);
  box-shadow: 0 4px 14px rgba(15,23,42,.14);
  transition: color .18s, border-color .18s, transform .18s;
}
.fang-fab:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.fang-fab .ico { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 560px) {
  .fang-fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== 第三十三轮（收尾）：头像、旧门禁入口、侧栏间距 ===== */
[data-theme="dark"] .avatar { color: var(--accent-text); background: rgba(157,178,255,.14); }
.gate-alt, #gateAltBtn, #gateAltForm { display: none !important; }
#nav { padding-bottom: 22px; }
.fact-v { white-space: normal; }

/* ============================================================
   v29 · 办事进度条 + 国资官网官方表单（2026-11-12）
   ============================================================ */

/* ---------- 办事进度 ---------- */
.prog-block { gap: 16px; }

/* ---------- 日期先后速查 ---------- */
.date-block {
  gap: 16px; padding: 20px 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.date-chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.date-chain li {
  position: relative; display: grid; gap: 3px; align-content: start;
  padding: 12px 12px 12px 40px; background: var(--surface-2); border-radius: 10px;
}
.date-chain .date-no {
  position: absolute; left: 12px; top: 12px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-weak); color: var(--accent-2);
  font-size: 11px; font-weight: 700;
}
.date-chain b { font-size: 13.5px; color: var(--text); }
.date-chain em { font-style: normal; font-size: 12px; line-height: 1.55; color: var(--text-3); }
.date-chain li + li::before { content: '→'; position: absolute; left: -9px; top: 18px; color: var(--text-3); font-size: 12px; }
.date-note { display: flex; gap: 6px; margin: 14px 0 0; font-size: 12px; line-height: 1.65; color: var(--text-3); }
.date-note .ico { width: 14px; height: 14px; margin-top: 2px; flex: 0 0 auto; }
@media (max-width: 960px) {
  .date-chain { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .date-chain li + li::before { display: none; }
}
@media (max-width: 560px) {
  .date-block { padding: 16px 14px; }
  .date-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .date-chain li { padding: 10px 10px 10px 36px; }
  .date-chain .date-no { left: 10px; top: 10px; }
}

.prog-track {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.prog-step { position: relative; display: flex; }
.prog-step::after {
  content: ""; position: absolute; top: 19px; left: 50%; right: -50%;
  height: 2px; background: var(--border); z-index: 0;
}
.prog-step.is-done::after { background: var(--ok); }
.prog-step:last-child::after { display: none; }
.prog-step > button {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  color: var(--text-3); font: inherit; border-radius: var(--radius);
}
.prog-dot {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--border-strong);
  font-size: 12px; font-weight: 700; color: var(--text-3);
  transition: background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.prog-dot .ico { width: 16px; height: 16px; }
.prog-step.is-done .prog-dot { background: var(--ok-weak); border-color: var(--ok); color: var(--ok); }
.prog-step.is-current .prog-dot {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 4px var(--accent-weak);
}
.prog-step.is-current .prog-name { color: var(--accent); font-weight: 650; }
.prog-step > button:hover .prog-dot { border-color: var(--accent); }
.prog-step > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.prog-name { font-size: 12.5px; line-height: 1.3; text-align: center; }

.prog-panel {
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-1);
}
.prog-panel.flash { animation: progFlash 1.4s var(--ease); }
@keyframes progFlash { 0% { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-weak); } 100% { border-color: var(--border); } }
.prog-panel-head { display: flex; gap: 14px; align-items: flex-start; }
.prog-badge {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--accent);
  background: var(--accent-weak); border: 1px solid var(--accent-line);
  padding: 4px 10px; border-radius: 99px; white-space: nowrap;
}
.prog-panel-head h3 { font-size: 18px; }
.prog-panel-head p { margin-top: 4px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; max-width: 82ch; }
.prog-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 18px; }
.prog-col h4 {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-3); margin-bottom: 8px;
}
.prog-col h4 .ico { width: 15px; height: 15px; color: var(--text-3); }
.prog-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.prog-list li { position: relative; padding-left: 14px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.prog-list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-line);
}
.prog-tip { display: flex; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.prog-tip .ico { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; }
.prog-who { font-size: 13.5px; color: var(--text-2); line-height: 1.65; margin-bottom: 10px; }
.prog-none { font-size: 13px; color: var(--text-3); }
.prog-tel { margin-bottom: 8px; }
.prog-sys {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; color: var(--text); background: var(--surface-2);
  transition: border-color .18s var(--ease);
}
.prog-sys .ico { width: 16px; height: 16px; color: var(--accent); }
.prog-sys:hover { border-color: var(--accent-line); }
.prog-actions {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  border-top: 1px dashed var(--border); padding-top: 16px;
}
.prog-done { display: flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; font-size: 14px; }
.prog-done .ico { width: 17px; height: 17px; }

/* ---------- 官方表单 ---------- */
.forms-block { gap: 14px; }
.form-group + .form-group { margin-top: 10px; }
.form-group-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.form-group-head h2 { font-size: 17px; }
.form-group-head p { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.form-group-head > a {
  display: flex; align-items: center; gap: 4px;
  font-size: 12.5px; color: var(--accent); white-space: nowrap;
}
.form-group-head > a .ico { width: 13px; height: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.form-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.form-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.form-card-head { display: flex; gap: 8px; align-items: baseline; }
.form-no {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--accent);
  background: var(--accent-weak); padding: 2px 7px; border-radius: 5px;
}
.form-card-head h3 { font-size: 14px; line-height: 1.4; }
.form-use { font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.form-file { display: flex; gap: 5px; font-size: 11.5px; color: var(--text-3); line-height: 1.5; word-break: break-all; }
.form-file .ico { width: 13px; height: 13px; flex: 0 0 auto; margin-top: 2px; }
.form-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border);
}
.form-src { font-size: 11px; color: var(--text-3); }
.form-dl { display: flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; min-height: 32px; }
.form-dl .ico { width: 14px; height: 14px; }
.form-note { display: flex; gap: 6px; font-size: 12px; color: var(--text-3); line-height: 1.6; }
.form-note .ico { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; }

.item-forms { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.form-inline {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); transition: border-color .18s var(--ease);
}
.form-inline > .ico { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }
.form-inline > span { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.form-inline b { font-size: 13px; }
.form-inline em { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.form-inline:hover { border-color: var(--accent-line); }

/* 总览 · 三个模块入口 */
.forms-teaser-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.forms-teaser-card {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.forms-teaser-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.forms-teaser-card b { font-size: 15px; }
.forms-teaser-card em { font-style: normal; font-size: 12px; color: var(--text-3); }
.ft-no {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; font-weight: 600; color: var(--accent);
  background: var(--accent-weak); padding: 2px 8px; border-radius: 99px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .prog-grid { grid-template-columns: 1fr 1fr; }
  .prog-grid .prog-col:last-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .prog-track { display: flex; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .prog-step { flex: 0 0 92px; scroll-snap-align: start; }
  .prog-panel { padding: 16px; }
  .prog-panel-head { flex-direction: column; gap: 8px; }
  .forms-teaser-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .prog-grid { grid-template-columns: 1fr; }
  .prog-grid .prog-col:last-child { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group-head { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   v31 · 三态主题图标 + 浅色侧栏收尾（2026-11-12）
   ============================================================ */
.theme-ico { display: grid; place-items: center; width: 100%; height: 100%; line-height: 1; }
.theme-ico .ico { width: 17px; height: 17px; }
.theme-auto {
  font-size: 9px; font-weight: 800; letter-spacing: .04em;
  color: var(--text-2);
}
#themeBtn[data-mode="auto"] .theme-auto { color: var(--text-2); }
#themeBtn[data-mode="light"] { color: var(--warn); }
#themeBtn[data-mode="dark"] { color: var(--accent); }

/* 底栏与侧栏同底，不再画一个独立色块 */
.sidebar-foot { background: transparent !important; border-top: 0 !important; }
#nav, .nav { max-height: calc(100vh - 240px) !important; }

/* 浅色侧栏：hover / 当前项 / 二级目录的对比度 */
[data-theme="light"] .nav a.is-active { box-shadow: inset 0 0 0 1px var(--accent-line); }
[data-theme="light"] .subnav-link.is-active { font-weight: 600; }
[data-theme="light"] .brand-text span { color: #5C6C82; }
#nav a.is-active span { color: var(--side-active-text); }
#nav a.is-active em { color: var(--side-active-text); opacity: .76; }

/* ===== 验收专家库（技术专家库总表 2026.09.20）===== */
.expert-block { gap: 14px; }
.expert-count { margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); }
.expert-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.expert-card { padding: 12px 14px; background: var(--surface-2); border-radius: 10px; border: 1px solid transparent; }
.expert-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.expert-top b { font-size: 14px; color: var(--text); }
.expert-top em { font-style: normal; font-size: 11.5px; color: var(--accent-2); background: var(--accent-weak); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.expert-dept { margin: 2px 0 0; font-size: 12px; color: var(--text-3); }
.expert-major { margin: 4px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.expert-code { margin: 4px 0 0; font-size: 11px; color: var(--text-3); }
@media (max-width: 960px) { .expert-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .expert-list { grid-template-columns: minmax(0, 1fr); } }

/* ===== v35：历史记录改为浮层，不再撑开首屏 ===== */
.ask-hist-wrap { position: relative; display: flex; justify-content: center; }
.ask-hist {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  z-index: 70; width: min(420px, calc(100vw - 32px));
  margin: 0; max-height: 300px; overflow: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-strong, var(--border));
  border-radius: 12px; box-shadow: var(--shadow-3, var(--shadow-2));
}
.ask-hist[hidden] { display: none; }
.ask-hist-item { border-radius: 8px; border-bottom: 0; min-height: 38px; }
.ask-hist-item + .ask-hist-item { border-top: 1px solid var(--border); }
@media (max-width: 560px) { .ask-hist { width: calc(100vw - 28px); } }

/* ===== v35：侧栏箭头可点击收起 ===== */
button.nav-caret {
  pointer-events: auto; width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center;
  border: 0; background: none; border-radius: 8px; cursor: pointer;
}
button.nav-caret { top: 10px; right: 6px; }
button.nav-caret:hover { background: var(--side-hover-bg); color: var(--side-text-strong); }
button.nav-caret:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ===== v35：站内消息 ===== */
.msg-btn { position: relative; }
.msg-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger, #E11D48); color: #fff; font-size: 10.5px; font-style: normal; line-height: 16px; text-align: center; }
.msg-panel {
  position: fixed; top: 64px; right: 20px; z-index: 120; width: min(380px, calc(100vw - 28px));
  max-height: min(460px, calc(100vh - 90px)); overflow: auto;
  background: var(--surface); border: 1px solid var(--border-strong, var(--border));
  border-radius: 14px; box-shadow: var(--shadow-3, var(--shadow-2));
}
.msg-panel header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.msg-panel header b { font-size: 14px; }
.msg-panel header button { border: 0; background: none; color: var(--accent-2); font: inherit; font-size: 12px; cursor: pointer; }
.msg-list { display: grid; }
.msg-empty { margin: 0; padding: 18px 14px; font-size: 13px; color: var(--text-3); }
.msg-item { display: grid; gap: 3px; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; cursor: pointer; font: inherit; }
.msg-item:last-child { border-bottom: 0; }
.msg-item:hover { background: var(--surface-2); }
.msg-item b { font-size: 13px; color: var(--text); }
.msg-item span { font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.msg-item em { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.msg-item.is-unread b::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.msg-pop { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 22px; background: rgba(10,17,32,.42); }
.msg-pop[hidden] { display: none; }
.msg-pop-card { width: min(430px, 100%); background: var(--surface); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow-3, var(--shadow-2)); }
.msg-pop-eyebrow { margin: 0 0 6px; font-size: 12px; color: var(--accent-2); letter-spacing: .04em; }
.msg-pop-card h3 { margin: 0 0 8px; font-size: 17px; }
.msg-pop-card p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-2); }
.msg-pop-ops { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.msg-pop-ops button, .msg-pop-ops a { flex: 1 1 auto; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.msg-pop-ops button { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.msg-pop-ops a { border: 0; background: var(--accent); color: #fff; }

/* 吐槽浮钮更清楚：图标 + 文字 */
.fang-fab { width: auto; height: 44px; padding: 0 14px 0 12px; gap: 6px; display: inline-flex; align-items: center; border-radius: 999px; }
.fang-fab .ico { width: 18px; height: 18px; }
.fang-fab span { font-size: 13px; font-weight: 600; }
@media (max-width: 560px) { .fang-fab { height: 46px; padding: 0 14px; } }

.expert-source { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.expert-source span { font-size: 12px; color: var(--text-3); }

/* ===== v36：快问快答独立一级目录 ===== */
.ask-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ask-help-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 50px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.ask-help-card .ico { width: 15px; height: 15px; color: var(--text-3); flex: 0 0 auto; }
.ask-help-card:hover { border-color: var(--accent); color: var(--accent-2); }
.ask-help-card:hover .ico { color: var(--accent); }
.ask-tip-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.ask-tip-list li { font-size: 13.5px; line-height: 1.75; color: var(--text-2); }
@media (max-width: 560px) {
  .ask-help-grid { grid-template-columns: minmax(0, 1fr); }
  .ask-help-card { min-height: 46px; }
}

/* v36 移动端：示例只留 3 条，其余到「常用问法」里看；顶部搜索图标放大 */
@media (max-width: 560px) {
  .ai-hero .ask-chip:nth-child(n+4) { display: none; }
  .ai-hero { margin-bottom: 6px; }
  .ai-hero + .ask-help { margin-top: 6px; }
  #searchBtn .ico { width: 19px; height: 19px; }
}

/* 360px：进度条「进入下一步」按钮文字过长会把页面撑宽 */
@media (max-width: 560px) {
  .prog-actions { flex-wrap: wrap; }
  .prog-actions .btn { width: 100%; white-space: normal; text-align: center; justify-content: center; min-height: 44px; }
}

/* ===== 侧栏二级目录序号（不计入 8 字限制） ===== */
.subnav-no {
  display: inline-block; min-width: 18px; margin-right: 5px;
  font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums;
}
.subnav-link.is-active .subnav-no { color: inherit; opacity: .8; }

/* v36：箭头点击区加大，多个目录可同时展开 */
button.nav-caret { width: 40px; height: 40px; top: 6px; right: 2px; font-size: 13px; }
button.nav-caret:hover { background: var(--side-hover-bg); }

button.nav-caret { border-radius: 50%; }
button.nav-caret:hover { background: var(--side-hover-bg); border-radius: 50%; }

/* ===== v37：侧栏可拖宽 ===== */
.app { position: relative; }
.side-resizer {
  position: absolute; top: 0; bottom: 0; left: calc(var(--sidebar-w) - 5px);
  width: 10px; z-index: 45; cursor: col-resize; background: transparent;
}
.side-resizer::after {
  content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px;
  background: var(--accent); opacity: 0; transition: opacity .15s ease;
}
.side-resizer:hover::after, .side-resizer:active::after { opacity: .55; }
body.resizing-side { cursor: col-resize; user-select: none; }
body.resizing-side .side-resizer::after { opacity: .8; }
@media (max-width: 960px) { .side-resizer { display: none; } }

/* 搜索面板：最近问过 + 清空 */
.pal-hint-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pal-clear { border: 0; background: none; color: var(--accent-2); font: inherit; font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.pal-clear:hover { background: var(--accent-weak); }

.side-resizer::after { opacity: .14; }

/* ===== 历史记录：搜索 + 类型筛选 ===== */
.ask-hist-tools { display: grid; gap: 8px; padding: 8px 8px 6px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.ask-hist-tools input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; }
.ask-hist-tools input:focus { outline: none; border-color: var(--accent); }
.ask-hist-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.ask-hist-tab { height: 26px; padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; background: none; color: var(--text-2); font: inherit; font-size: 11.5px; cursor: pointer; }
.ask-hist-tab.is-on { background: var(--accent-weak); border-color: var(--accent); color: var(--accent-2); }
.ask-hist-type { flex: 0 0 auto; font-style: normal; font-size: 10.5px; line-height: 16px; padding: 0 5px; border-radius: 5px; background: var(--accent-weak); color: var(--accent-2); }
.ask-hist-item { gap: 8px; }

/* v40：平板/手机底部留白 + 移动端区块间距收紧 */
@media (max-width: 960px) { .view { padding-bottom: 110px; } }
@media (max-width: 560px) {
  .block, section.block { margin-top: 26px; }
  .view { gap: 18px; }
}

/* 问答：参考来源 */
.ask-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--text-3); }
.ask-sources span { flex: 0 0 auto; }
.ask-sources a { color: var(--accent-2); text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--accent-2) 40%, transparent); }
.ask-sources a:hover { border-bottom-style: solid; }
