/* 青石云演示说明书 · 公共样式（图文版指南页共用） */
:root {
  --ink: #1c2430;
  --muted: #5a6575;
  --line: #d8dee8;
  --bg: #f3f1ec;
  --card: #ffffff;
  --accent: #2f5f8a;
  --accent-soft: #e8f0f7;
  --ok: #2f7d4a;
  --ok-soft: #e8f5ec;
  --warn: #9a6b1f;
  --warn-soft: #f8f0e0;
  --stone: #6b6258;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, #e7eef5 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, #ebe6dc 0%, transparent 50%),
    var(--bg);
  line-height: 1.65;
}

body.lightbox-lock { overflow: hidden; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 32px 20px 80px; }

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* 目录 */
.toc {
  position: sticky;
  top: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 14px;
  box-shadow: 0 2px 10px rgba(28, 36, 48, 0.04);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.toc-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--line);
}

.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }

.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  border-left: 2px solid transparent;
}

.toc a:hover { color: var(--accent); background: var(--accent-soft); }

.toc a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 600;
}

.content { min-width: 0; }

/* Hero 头图：默认深色；--sky 为领用出库等浅色主题 */
header.hero {
  color: #f7fafc;
  border-radius: 16px;
  padding: 36px 36px 32px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #243447 0%, #2f5f8a 55%, #3d6f7a 100%);
  box-shadow: 0 12px 40px rgba(36, 52, 71, 0.22);
}

header.hero.hero--sky {
  background: linear-gradient(135deg, #5ba8e8 0%, #7ec4f5 55%, #6db8f0 100%);
  color: #fff;
  box-shadow: 0 12px 40px rgba(91, 168, 232, 0.28);
}

header.hero .eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  opacity: 0.92;
}

header.hero.hero--sky .eyebrow { opacity: 1; color: #fff; }

header.hero h1 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

header.hero.hero--sky h1 { color: #fff; }

header.hero p {
  margin: 0;
  font-size: 15px;
  max-width: 42em;
  opacity: 0.92;
}

header.hero.hero--sky p { color: #fff; opacity: 1; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.meta span,
.meta a {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  color: inherit;
  text-decoration: none;
}

header.hero.hero--sky .meta span,
header.hero.hero--sky .meta a {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.meta a:hover { background: rgba(255, 255, 255, 0.28); }

/* 内容卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 26px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(28, 36, 48, 0.04);
}

h2 {
  margin: 0 0 14px;
  font-size: 20px;
  color: var(--ink);
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

h3 { margin: 0 0 8px; font-size: 16px; }

p, li { color: var(--muted); font-size: 14.5px; }
.lead { color: var(--ink); font-size: 15.5px; }

/* 步骤块（默认紧凑圆标；--large 为大号方标，智慧预算等页使用） */
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step.step--large {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 8px;
}

.step-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.step.step--large .step-num {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 18px;
  margin-top: 0;
}

.step-body { flex: 1; min-width: 0; }
.step.step--large .step-body h3 { margin-top: 4px; color: var(--ink); }

ol.ops { margin: 8px 0 12px; padding-left: 1.25em; }
ol.ops li { margin: 6px 0; }
.step.step--large ol.ops { padding-left: 1.2em; margin: 8px 0; }
.step.step--large ol.ops li { margin: 4px 0; }

.tip,
.ok-box,
.warn-box {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13.5px;
  margin-top: 12px;
}

.tip--script {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--warn-soft);
  border-left: 3px solid var(--warn);
  border-radius: 0 8px 8px 0;
  color: #5c4818;
}

.tip--script strong { color: #4a3a12; }

.tip,
.ok-box {
  background: var(--ok-soft);
  border: 1px solid #cfe8d7;
  color: var(--ok);
}

.warn-box {
  background: var(--warn-soft);
  border: 1px solid #edd9a8;
  color: var(--warn);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
}

/* 说明书内：跳转产品功能页的入口链接 */
a.app-page-link {
  color: #5ba3e0;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: #8ec4ef;
  /* 相邻链接下划线不粘连 */
  margin: 0 0.12em;
  padding: 0 0.06em;
  white-space: nowrap;
}
a.app-page-link:hover {
  color: #3d8fd4;
  text-decoration-color: #5ba3e0;
}
a.tag.app-page-link {
  text-decoration: none;
  margin: 0 0.2em;
  padding: 2px 8px;
  color: #4a9ad9;
  background: #eef6fc;
  border: 1px solid #cfe4f6;
}
a.tag.app-page-link:hover {
  color: #2f7fc4;
  filter: none;
  background: #e3f1fb;
  text-decoration: none;
}
.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0 4px;
}
.entry-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #cfe4f6;
  background: #fff;
  color: #5ba3e0;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.entry-links a:hover {
  background: #eef6fc;
  border-color: #8ec4ef;
  color: #3d8fd4;
}
.entry-links a::after {
  content: "↗";
  font-size: 12px;
  opacity: 0.75;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--accent-soft); color: var(--accent); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 10px 0 4px;
}

th, td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

th { background: #f7f8fa; color: var(--ink); font-weight: 600; }
td { color: var(--muted); }

a { color: var(--accent); }

footer {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--stone);
}

footer a { color: var(--accent); }

/* 两阶段 / 分栏 */
.phase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.phase {
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
}

.phase.a { background: var(--accent-soft); border-color: #c5d6e8; }
.phase.b { background: var(--ok-soft); border-color: #c5e0cf; }
.phase strong { display: block; color: var(--ink); margin-bottom: 6px; font-size: 15px; }
.phase span { font-size: 13.5px; color: var(--muted); }

.checklist { list-style: none; padding: 0; margin: 8px 0 0; }

.checklist li {
  padding: 8px 0 8px 28px;
  position: relative;
  border-bottom: 1px dashed var(--line);
  color: var(--muted);
}

.checklist li::before {
  content: "☐";
  position: absolute;
  left: 4px;
  color: var(--accent);
}

.flow-ascii {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 14px 0 4px;
  font-size: 13px;
}

.flow-ascii .node {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #c5d6e8;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
}

.flow-ascii .arrow { color: var(--stone); }

.quote {
  margin: 12px 0 0;
  padding: 14px 16px;
  background: #f7f8fa;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  font-style: normal;
}

.quote::before {
  content: "话术 · ";
  color: var(--accent);
  font-weight: 700;
  font-style: normal;
}

.highlight-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 4px 0 16px;
  padding: 14px 16px;
  background: linear-gradient(90deg, var(--accent-soft), #f7f8fa);
  border: 1px solid #c5d6e8;
  border-radius: 12px;
}

.highlight-banner .pct {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.highlight-banner p {
  margin: 0;
  color: var(--ink);
  font-size: 14.5px;
  flex: 1;
  min-width: 200px;
}

.sample-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.sample-grid figure { margin: 0; text-align: left; }
.sample-grid figcaption { text-align: left; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.tag-row .badge { font-weight: 600; }

/* 截图与热点标注 */
figure {
  margin: 16px 0 8px;
  text-align: center;
  position: relative;
  overflow: visible;
}

figure .zoomable {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #eef1f5;
  overflow: hidden;
  cursor: zoom-in;
  padding: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
}

.zoom-stage {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
}

.zoom-stage > img {
  width: 100%;
  height: auto;
  display: block;
  border: 0;
  background: #fff;
  pointer-events: none;
}

.hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
}

.hotspot-num {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e85d04;
  border: 1.5px solid #fff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 1px 6px rgba(12, 18, 28, 0.3);
  z-index: 2;
}

.hotspot-callout {
  position: absolute;
  top: 0;
  left: 14px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  max-width: none;
}

.hotspot-arrow {
  flex: 0 0 auto;
  width: 14px;
  height: 2px;
  background: #e85d04;
  position: relative;
}

.hotspot-arrow::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-right: 6px solid #e85d04;
}

.hotspot-label {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(28, 36, 48, 0.58);
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  text-align: left;
  box-shadow: 0 1px 6px rgba(12, 18, 28, 0.18);
  border: 1px solid rgba(232, 93, 4, 0.35);
}

.hotspot.flip .hotspot-callout {
  left: auto;
  right: 14px;
  flex-direction: row-reverse;
}

.hotspot.flip .hotspot-arrow::after {
  left: auto;
  right: -1px;
  border: 4px solid transparent;
  border-left: 6px solid #e85d04;
}

.hotspot.below .hotspot-callout {
  left: 14px;
  right: auto;
  top: 0;
  transform: translateY(-50%);
  flex-direction: row;
  align-items: center;
  max-width: none;
}

.hotspot.below.flip .hotspot-callout {
  left: auto;
  right: 14px;
  flex-direction: row-reverse;
}

.hotspot.above .hotspot-callout {
  left: 12px;
  right: auto;
  top: auto;
  bottom: 10px;
  transform: none;
  flex-direction: row;
  align-items: center;
  max-width: 128px;
}

.hotspot.above .hotspot-arrow {
  width: 14px;
  height: 2px;
}

.hotspot.above .hotspot-arrow::after {
  left: -1px;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-right: 6px solid #e85d04;
}

.hotspot.above.flip .hotspot-callout {
  left: auto;
  right: 12px;
  flex-direction: row-reverse;
}

.hotspot.above.flip .hotspot-arrow::after {
  left: auto;
  right: -1px;
  border: 4px solid transparent;
  border-left: 6px solid #e85d04;
}

.guide--compact-hotspots h3 { margin: 18px 0 8px; }

.guide--compact-hotspots footer {
  margin-top: 28px;
  text-align: center;
}

/* 智慧预算页：较小热点、可换行标签 */
.guide--compact-hotspots .hotspot-num {
  width: 18px;
  height: 18px;
  font-size: 10px;
  line-height: 15px;
}

.guide--compact-hotspots .hotspot-callout {
  left: 12px;
  max-width: 128px;
}

.guide--compact-hotspots .hotspot-label {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 6px;
  font-size: 10px;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  background: rgba(28, 36, 48, 0.9);
  border-color: rgba(232, 93, 4, 0.45);
}

.guide--compact-hotspots .hotspot.flip .hotspot-callout {
  right: 12px;
}

.guide--compact-hotspots .hotspot.below .hotspot-callout {
  left: 12px;
  top: 10px;
  transform: none;
  max-width: 128px;
}

.guide--compact-hotspots .hotspot.below.flip .hotspot-callout {
  right: 12px;
}

figure .zoomable::after {
  content: "点击放大";
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(28, 36, 48, 0.72);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  line-height: 1.4;
}

figure .zoomable:hover::after,
figure .zoomable:focus-visible::after {
  opacity: 1;
}

figure .zoomable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

figcaption {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--stone);
  line-height: 1.5;
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 12px 12px;
  background: rgba(12, 18, 28, 0.88);
  backdrop-filter: blur(2px);
}

.lightbox.is-open { display: flex; }

.lightbox-dialog {
  width: min(100vw - 24px, calc((100vh - 56px) * 16 / 9));
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lightbox-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox-frame .zoom-stage { width: 100%; height: 100%; }

.lightbox-frame .zoom-stage > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.guide--compact-hotspots .lightbox-frame .zoom-stage {
  width: auto;
  max-width: 100%;
  max-height: 100%;
}

.guide--compact-hotspots .lightbox-frame .zoom-stage > img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 72px);
  height: auto;
}

.lightbox-cap {
  margin: 0;
  text-align: center;
  color: #e5e7eb;
  font-size: 13px;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
}

.lightbox-close {
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(15, 23, 42, 0.95);
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, 0.3); }

.lightbox-nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }

.lightbox-counter,
.lightbox-hint {
  position: absolute;
  top: 18px;
  color: #d1d5db;
  font-size: 13px;
  z-index: 2;
  pointer-events: none;
}

.lightbox-counter { left: 20px; }
.lightbox-hint { left: 50%; transform: translateX(-50%); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; margin-bottom: 4px; }
  .toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
}

@media (max-width: 700px) {
  header.hero { padding: 28px 22px; }
  header.hero h1 { font-size: 22px; }
  .toc ol { grid-template-columns: 1fr; }
  .phase-grid { grid-template-columns: 1fr; }
  .sample-grid { grid-template-columns: 1fr; }
  .hotspot-num {
    width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 15px;
  }
  .hotspot-callout { max-width: none; }
  .hotspot-label { font-size: 10px; white-space: nowrap; }
  .guide--compact-hotspots .hotspot-callout { max-width: 96px; }
  .guide--compact-hotspots .hotspot-label {
    font-size: 9px;
    padding: 2px 5px;
    white-space: normal;
  }
  .guide--compact-hotspots .hotspot-arrow { width: 10px; }
  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }
  .lightbox-nav.prev { left: 6px; }
  .lightbox-nav.next { right: 6px; }
  .lightbox-hint { display: none; }
}
