/* css/psm.css —— 第21应用 PSM助手
   视觉与安小助一致：浅灰底 / 白卡片 / 安全蓝。类名与 js/psm.js 渲染结构一一对应 */

.psm-page {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: var(--page-max, 1080px);
  margin: 0 auto;
  padding: 0;
  color: var(--ink, #1c2430);
  font-size: var(--fs-base, 15px);
  line-height: 1.6;
}

/* ---------- Hero ---------- */
.psm-hero {
  background: linear-gradient(160deg, var(--blue, #2f7cf6) 0%, #2460d0 100%);
  color: #fff;
  border-radius: var(--radius, 16px);
  padding: 22px 20px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(20, 40, 80, .12));
}
.psm-hero-kicker {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 8px;
}
.psm-hero-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.psm-hero-title > span.psm-hero-sub { font-size: 26px; font-weight: 800; opacity: 1; letter-spacing: 0; white-space: nowrap; }
.psm-hero-quota { font-size: 12.5px; font-weight: 600; background: rgba(255, 255, 255, .22); padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.psm-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.psm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: var(--fw-medium, 500);
  padding: 4px 10px; border-radius: var(--radius-pill, 999px);
  background: rgba(255, 255, 255, .16); color: #fff;
}
.psm-chip-ok { background: rgba(255, 255, 255, .95); color: var(--blue, #2f7cf6); }
.psm-chip-lock { background: rgba(255, 255, 255, .95); color: var(--orange, #e8890c); }
.psm-hero-desc { margin: 2px 0 0; font-size: 14px; opacity: .96; }
.psm-hero-tip { margin: 8px 0 0; font-size: 13px; opacity: .9; }
.psm-hero-site { margin: 2px 0 0; font-size: 12px; line-height: 1.6; opacity: .82; }
.psm-hero-site a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.psm-hero-site a:active { opacity: .7; }

/* ---------- 通用 section 头 ---------- */
.psm-sec-head { margin-bottom: 14px; }
.psm-sec-head h2 { margin: 0 0 2px; font-size: var(--fs-lg, 18px); font-weight: var(--fw-bold, 700); color: var(--ink, #1c2430); }
.psm-sec-head p { margin: 0; font-size: var(--fs-xs, 12.5px); color: var(--muted, #6b7686); }

/* ---------- 实施路径 ---------- */
.psm-card {
  background: var(--white, #fff);
  border: 1px solid var(--line, #e6eaf0);
  border-radius: var(--radius, 16px);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(20, 40, 80, .06));
}
.psm-path { margin-bottom: 16px; }
.psm-steps { display: flex; flex-direction: column; gap: 8px; }
.psm-step { display: flex; align-items: flex-start; gap: 12px; }
.psm-step-no {
  flex: none; width: 26px; height: 26px; margin-top: 2px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-soft, #e8f0ff); color: var(--blue, #2f7cf6);
  font-size: 13px; font-weight: var(--fw-bold, 700);
}
.psm-step-bd { flex: 1; min-width: 0; padding-bottom: 10px; border-bottom: 1px dashed var(--line, #e6eaf0); }
.psm-step:last-child .psm-step-bd { border-bottom: none; padding-bottom: 0; }
.psm-step-name { font-size: 14px; font-weight: var(--fw-semibold, 600); color: var(--ink, #1c2430); }
.psm-step-tip { font-size: 12.5px; color: var(--muted, #6b7686); margin-top: 1px; }
.psm-step-arrow { flex: none; color: var(--blue, #2f7cf6); font-size: 18px; line-height: 24px; }

/* ---------- 要素全景 ---------- */
.psm-map { margin-top: 4px; }
.psm-sec-head-map { padding: 2px 2px 0; }

.psm-group {
  background: var(--bg-elevated, #fff);
  border: 1px solid var(--line, #e6eaf0);
  border-radius: var(--radius, 16px);
  padding: 16px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(20, 40, 80, .06));
}
.psm-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.psm-group-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.psm-group-tx { flex: 1; min-width: 0; }
.psm-group-tx h2 { margin: 0; font-size: 16px; font-weight: var(--fw-bold, 700); color: var(--ink, #1c2430); }
.psm-group-tx p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted, #6b7686); }
.psm-group-n {
  flex: none; font-size: 12px; font-weight: var(--fw-medium, 500);
  color: var(--muted, #6b7686); background: var(--bg, #f3f5f8);
  border-radius: var(--radius-pill, 999px); padding: 3px 10px;
}

.psm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }

.psm-el {
  position: relative; text-align: left; cursor: pointer;
  box-sizing: border-box; min-width: 0;
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e6eaf0);
  border-radius: var(--radius-sm, 12px);
  padding: 12px 12px 11px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  font-family: inherit;
}
.psm-el:hover { transform: translateY(-2px); box-shadow: var(--shadow-md, 0 6px 18px rgba(20,40,80,.1)); border-color: var(--line-strong, #cdd5e0); }
.psm-el-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.psm-el-no {
  font-size: 12px; font-weight: var(--fw-bold, 700);
  border-radius: var(--radius-xs, 6px); padding: 2px 7px;
}
.psm-el-go { font-size: 12px; color: var(--blue, #2f7cf6); font-weight: var(--fw-medium, 500); }
.psm-el-lock-ico { font-size: 11px; color: var(--orange, #e8890c); font-weight: var(--fw-medium, 500); }
.psm-el-en {
  font-size: 11px; letter-spacing: .02em; text-transform: uppercase;
  color: var(--muted, #6b7686); margin-bottom: 3px; line-height: 1.3;
}
.psm-el-name { font-size: 15px; font-weight: var(--fw-semibold, 600); color: var(--ink, #1c2430); line-height: 1.35; }
.psm-el-desc { margin-top: 4px; font-size: 12.5px; color: var(--muted, #6b7686); line-height: 1.45; }
.psm-el-group {
  display: inline-block; margin-top: 8px; font-size: 11px; color: var(--blue, #2f7cf6);
  background: var(--blue-soft, #e8f0ff); border-radius: var(--radius-xs, 6px); padding: 2px 7px;
}
.psm-el-lock::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(232, 137, 12, .25);
  pointer-events: none;
}
.psm-el-free {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  background: #e8f7ee; color: #1a8f4c; border: 1px solid rgba(26, 143, 76, .28);
  border-radius: var(--radius-xs, 6px); padding: 2px 7px;
  font-size: 11px; font-weight: 600;
}

/* ---------- 未开通引导 ---------- */
.psm-lockfoot {
  background: var(--blue-soft, #e8f0ff);
  border: 1px solid rgba(47, 124, 246, .25);
  border-radius: var(--radius, 16px);
  padding: 18px 16px;
  text-align: center;
}
.psm-lockfoot-tt { font-size: 16px; font-weight: var(--fw-bold, 700); color: var(--blue, #2f7cf6); }
.psm-lockfoot p { margin: 6px auto 14px; max-width: 460px; font-size: 13px; color: var(--ink-2, #515c6e); }
.psm-lockfoot .btn-primary { width: auto; }

/* ---------- 详情：面包屑 ---------- */
.psm-crumb { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; font-size: 13px; color: var(--muted, #6b7686); }
.psm-back {
  background: none; border: none; cursor: pointer; padding: 4px 8px; margin: -4px -8px;
  color: var(--blue, #2f7cf6); font-weight: var(--fw-semibold, 600); font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 2px; border-radius: var(--radius-xs, 6px);
  font-family: inherit;
}
.psm-back:hover { background: var(--blue-soft, #e8f0ff); }
.psm-back-ico { font-size: 18px; line-height: 1; }
.psm-crumb-sep { color: var(--line-strong, #cdd5e0); }
.psm-crumb-cur { color: var(--ink, #1c2430); font-weight: var(--fw-medium, 500); }

/* ---------- 详情布局：移动单列主内容优先；桌面两栏 ---------- */
.psm-detail-layout { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
.psm-detail-main { order: 1; min-width: 0; }
.psm-side { position: static; order: 2; min-width: 0; }

/* ---------- 侧栏 ---------- */
.psm-side-hero {
  background: var(--white, #fff);
  border: 1px solid var(--line, #e6eaf0);
  border-radius: var(--radius, 16px);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(20,40,80,.06));
  margin-bottom: 12px;
}
/* 侧栏 hero 里的大号要素徽章（与同组列表里的小徽章 .psm-side-no 区分开，避免样式互相覆盖） */
.psm-side-badge {
  display: inline-block; font-size: 12px; font-weight: var(--fw-bold, 700);
  border-radius: var(--radius-xs, 6px); padding: 2px 8px; margin-bottom: 8px;
}
.psm-side-en { font-size: 11px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted, #6b7686); }
.psm-side-hero h2 { margin: 4px 0 6px; font-size: 20px; font-weight: var(--fw-bold, 700); color: var(--ink, #1c2430); line-height: 1.3; }
.psm-side-g { font-size: 12.5px; font-weight: var(--fw-semibold, 600); margin-bottom: 8px; }
.psm-side-one { font-size: 13px; color: var(--ink-2, #515c6e); margin: 0 0 8px; }
.psm-side-why { font-size: 12.5px; color: var(--muted, #6b7686); margin: 0; line-height: 1.55; }

.psm-fake { background: #fff8ef; border: 1px solid #f3dfc0; border-radius: var(--radius-sm, 12px); padding: 10px 12px; margin-bottom: 12px; font-size: 12.5px; }
.psm-fake summary { cursor: pointer; color: var(--orange, #e8890c); font-weight: var(--fw-semibold, 600); }
.psm-fake ul { margin: 8px 0 0; padding-left: 16px; color: var(--ink-2, #515c6e); }
.psm-fake li { margin-bottom: 3px; }

.psm-side-nav { background: var(--white, #fff); border: 1px solid var(--line, #e6eaf0); border-radius: var(--radius, 16px); padding: 14px 12px; }
.psm-side-nav h3 { margin: 0 0 8px; font-size: 13px; font-weight: var(--fw-semibold, 600); color: var(--muted, #6b7686); }
.psm-side-el {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; padding: 8px 10px; margin-bottom: 2px;
  border-radius: var(--radius-xs, 8px); font-family: inherit; transition: background .1s ease;
}
.psm-side-el:hover { background: var(--bg, #f3f5f8); }
.psm-side-el.is-on { background: var(--blue-soft, #e8f0ff); }
.psm-side-no {
  flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: var(--fw-bold, 700); color: var(--muted, #6b7686);
  background: var(--bg, #f3f5f8); border-radius: var(--radius-xs, 6px);
}
.psm-side-el.is-on .psm-side-no { color: var(--blue, #2f7cf6); background: #d6e6ff; }
.psm-side-tx { flex: 1; min-width: 0; }
.psm-side-tx b { display: block; font-size: 13.5px; font-weight: var(--fw-semibold, 600); color: var(--ink, #1c2430); line-height: 1.35; }
.psm-side-tx i { display: block; font-style: normal; font-size: 11px; color: var(--muted, #6b7686); text-transform: uppercase; letter-spacing: .02em; }

/* ---------- 详情主区 ---------- */
.psm-detail-main {
  background: var(--white, #fff);
  border: 1px solid var(--line, #e6eaf0);
  border-radius: var(--radius, 16px);
  padding: 18px 16px 20px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(20,40,80,.06));
}

.psm-pts {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin: 0 0 4px;
  scrollbar-width: thin;
}
.psm-pts::-webkit-scrollbar { height: 4px; }
.psm-pts::-webkit-scrollbar-thumb { background: var(--line-strong, #cdd5e0); border-radius: 4px; }
.psm-pt {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line, #e6eaf0); background: var(--bg, #f3f5f8); cursor: pointer;
  border-radius: var(--radius-pill, 999px); padding: 6px 13px; font-family: inherit;
  font-size: 13px; color: var(--ink-2, #515c6e); transition: all .12s ease;
}
.psm-pt:hover { border-color: var(--line-strong, #cdd5e0); }
.psm-pt.is-on { background: var(--blue, #2f7cf6); border-color: var(--blue, #2f7cf6); color: #fff; }
.psm-pt-i {
  width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: var(--fw-bold, 700);
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.05); color: inherit;
}
.psm-pt.is-on .psm-pt-i { background: rgba(255,255,255,.22); }

.psm-pointhead { padding: 8px 2px 14px; border-bottom: 1px solid var(--line, #e6eaf0); }
.psm-pointhead-tag {
  display: inline-block; font-size: 11px; font-weight: var(--fw-semibold, 600); color: var(--blue, #2f7cf6);
  background: var(--blue-soft, #e8f0ff); border-radius: var(--radius-pill, 999px); padding: 3px 10px; margin-bottom: 8px;
}
.psm-pointhead h2 { margin: 0 0 6px; font-size: 21px; font-weight: var(--fw-bold, 700); color: var(--ink, #1c2430); line-height: 1.3; }
.psm-pointhead-tip { margin: 0; font-size: 13px; color: var(--muted, #6b7686); }

.psm-why {
  margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--blue, #2f7cf6);
  background: var(--blue-soft, #e8f0ff); border-radius: 0 var(--radius-xs, 8px) var(--radius-xs, 8px) 0;
  font-size: 13px; color: var(--ink-2, #515c6e); line-height: 1.6;
}
.psm-why b { color: var(--blue, #2f7cf6); font-weight: var(--fw-bold, 700); margin-right: 4px; }

.psm-blk { margin-top: 18px; }
.psm-blk-tt { margin: 0 0 10px; font-size: 16px; font-weight: var(--fw-bold, 700); color: var(--ink, #1c2430); }
.psm-blk-sub { font-size: 12px; font-weight: var(--fw-regular, 400); color: var(--muted, #6b7686); margin-left: 6px; }

.psm-how { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.psm-how li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink, #1c2430); line-height: 1.55; }
.psm-how-no {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--eco-soft, #e4f5ee); color: var(--eco, #1aa87a);
  font-size: 12px; font-weight: var(--fw-bold, 700);
}

.psm-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.psm-chk { display: flex; gap: 10px; align-items: flex-start; }
.psm-chk-box {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: var(--radius-xs, 6px);
  border: 2px solid var(--line-strong, #cdd5e0); background: var(--white, #fff);
}
.psm-chk-tx { flex: 1; min-width: 0; font-size: 14px; color: var(--ink, #1c2430); line-height: 1.5; overflow-wrap: anywhere; }
.psm-chk-ev { margin-top: 1px; font-size: 12px; color: var(--muted, #6b7686); }
.psm-chk-ev::before { content: '🖹 '; }

/* ---------- AI 面板 ---------- */
.psm-ai {
  margin-top: 20px; padding: 16px; border-radius: var(--radius, 16px);
  background: linear-gradient(160deg, #f4f8ff, #eef4ff);
  border: 1px solid rgba(47, 124, 246, .18);
}
.psm-ai-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.psm-ai-head h3 { margin: 0; font-size: 16px; font-weight: var(--fw-bold, 700); color: var(--blue, #2f7cf6); }
.psm-ai-head p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted, #6b7686); }
.psm-ai-lock {
  flex: none; font-size: 11px; font-weight: var(--fw-medium, 500); color: var(--orange, #e8890c);
  background: #fff; border: 1px solid #f3dfc0; border-radius: var(--radius-pill, 999px); padding: 3px 9px;
}
.psm-ai-fact { margin-bottom: 12px; }
.psm-ai-fact label { display: block; font-size: 13px; font-weight: var(--fw-medium, 500); color: var(--ink, #1c2430); margin-bottom: 6px; }
.psm-ai-fact textarea {
  width: 100%; box-sizing: border-box; resize: vertical;
  border: 1px solid var(--line-strong, #cdd5e0); border-radius: var(--radius-sm, 12px);
  padding: 10px 12px; font-size: 14px; line-height: 1.5; color: var(--ink, #1c2430);
  background: #fff; font-family: inherit;
}
.psm-ai-fact textarea:focus { outline: none; border-color: var(--blue, #2f7cf6); box-shadow: 0 0 0 3px rgba(47,124,246,.12); }
.psm-ai-btn { width: 100%; }
.psm-ai-out { margin-top: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line, #e6eaf0); border-radius: var(--radius-sm, 12px); }
.psm-ai-out.is-busy { display: flex; align-items: center; gap: 8px; color: var(--muted, #6b7686); font-size: 13px; }
.psm-ai-dots { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--blue-2, #7aa7f8); border-top-color: transparent; animation: psm-spin .7s linear infinite; }
@keyframes psm-spin { to { transform: rotate(360deg); } }
.psm-ai-tag {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12.5px; font-weight: var(--fw-semibold, 600); color: var(--blue, #2f7cf6); margin-bottom: 4px;
}
.psm-copy {
  background: none; border: 1px solid var(--line-strong, #cdd5e0); border-radius: var(--radius-xs, 6px);
  color: var(--ink-2, #515c6e); font-size: 12px; cursor: pointer; padding: 3px 8px; font-family: inherit;
}
.psm-copy:hover { color: var(--blue, #2f7cf6); border-color: var(--blue, #2f7cf6); }
.psm-ai-err { font-weight: 500; color: #d64545; font-size: 12px; margin-left: auto; line-height: 1.4; }
.psm-ai-md { font-size: 14px; color: var(--ink, #1c2430); line-height: 1.65; }
.psm-ai-md p { margin: 0 0 8px; }
.psm-ai-md h4, .psm-ai-md h5 { margin: 12px 0 6px; font-size: 14.5px; font-weight: var(--fw-bold, 700); color: var(--ink, #1c2430); }
.psm-ai-md h5 { font-size: 14px; }
.psm-ai-md ul, .psm-ai-md ol { margin: 6px 0; padding-left: 20px; }
.psm-ai-md li { margin-bottom: 4px; }
.psm-ai-md b { color: var(--blue, #2f7cf6); }
.psm-ai-md code { background: var(--bg, #f3f5f8); border-radius: 4px; padding: 1px 5px; font-size: 12.5px; }

.psm-empty {
  text-align: center; color: var(--muted, #6b7686); padding: 40px 12px; font-size: 14px;
}

/* ---------- 桌面端两栏 ---------- */
@media (min-width: 980px) {
  .psm-detail-layout { grid-template-columns: 300px 1fr; }
  .psm-side { position: sticky; top: calc(var(--header-h, 56px) + 10px); order: 0; }
  .psm-detail-main { order: 0; }
  .psm-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .psm-hero { padding: 28px 26px 24px; }
  .psm-hero-title { font-size: 34px; }
}
/* PSM 未登录身份选择引导 */
.psm-vip-pick { display: flex; flex-direction: column; gap: 10px; }
.psm-vip-pick .btn { width: 100%; justify-content: center; }
}