/*
  中文说明：DSH Buddy 产品介绍页的全部样式。

  这份样式做三件事：
  1. 沿用旧介绍页的颜色和头像画法（浅底、紫色强调、绿色辅助、CSS 画的小脸），让品牌看起来还是同一个。
  2. 页面的主角是真实截图：像素办公室、项目会话、用量页。周围的东西都尽量安静，不抢截图的戏。
  3. 固定浅色背景，不跟随系统深色模式（对外页面在任何设备上看都是同一个样子）。

  读这份文件的顺序：变量 → 基础 → 按钮 → 页头 → 首屏 → 办公室 → 各节标题 → 管得住 → 交代一句 → 截图外框
  → 角色 → 开始 → 边界与问答 → 结尾 → 页脚 → 小提示 → 小屏适配。
*/

/* ---------- 字体：英文和数字用随页面带的字体，中文用系统自带的字体，不联网下载 ---------- */
@font-face {
  font-family: Instrument;
  src: url('../_shared/fonts/InstrumentSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Instrument;
  src: url('../_shared/fonts/InstrumentSans-Bold.ttf') format('truetype');
  font-weight: 600 900;
  font-display: swap;
}
@font-face {
  font-family: DMMono;
  src: url('../_shared/fonts/DMMono-Regular.ttf') format('truetype');
  font-display: swap;
}

/* ---------- 变量：所有颜色、字号、间距都从这里取，改一处全页生效 ---------- */
:root {
  /* 告诉浏览器这页只有浅色，表单控件和滚动条也按浅色画 */
  color-scheme: light;

  /* 底色与文字 */
  --paper: #f9faf8;        /* 整页底色：带一点点绿的白 */
  --card: #ffffff;         /* 卡片和窗口的白 */
  --ink: #202622;          /* 正文黑：带一点绿，不用纯黑 */
  --muted: #5a635b;        /* 次要文字 */
  --rule: #dfe5de;         /* 分隔线 */

  /* 品牌色：紫色管「可以点的」，绿色管「状态和说明」 */
  --iris: #5b49b3;
  --iris-deep: #49398e;
  --moss: #2f6650;

  /* 三个浅色块：只用在头像上 */
  --lavender: #e9e4fb;
  --apricot: #f8e7d3;
  --apricot-ink: #8a5027;
  --mint: #d7ebdf;

  /* 大面积的淡底 */
  --wash: #f2f4f0;
  --iris-wash: #f4f1fc;
  --mint-wash: #eaf4ee;

  /* 桌牌：照着办公室截图里队友头顶那块小牌子画的，米黄底、黑边、硬阴影 */
  --plate: #fdf3c4;

  --font: Instrument, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: DMMono, ui-monospace, SFMono-Regular, Menlo, monospace;

  /* 内容区最大宽度 */
  --max: 1160px;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* 页头是吸顶的，点导航跳转时给它留出位置，不然标题会被页头挡住 */
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* 键盘操作时的焦点框：所有能点的东西都要看得见焦点 */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #7667c8;
  outline-offset: 3px;
  border-radius: 4px;
}

/* 内容区：两边至少留 40px */
.container {
  width: calc(100% - 80px);
  max-width: var(--max);
  margin-inline: auto;
}

/* 给读屏软件用的「跳到正文」，平时藏在屏幕外，按 Tab 才出现 */
.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--card);
  border-radius: 6px;
}
.skip-link:focus { top: 10px; }

/* ---------- 按钮：全页只有两种，实心的是主动作，描边的是次要动作 ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.button-solid { background: var(--iris); color: #fff; }
.button-solid:hover { background: var(--iris-deep); }
.button-line { border-color: #c9d1c9; background: transparent; }
.button-line:hover { border-color: var(--ink); background: var(--card); }
.button-small { min-height: 38px; padding: 7px 15px; font-size: 14px; }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(249, 250, 248, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-header .bar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* 品牌字标：两块叠在一起的圆角方块 + 名字，和旧页面保持一致 */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  letter-spacing: -.6px;
  white-space: nowrap;
}
.wordmark strong { font-weight: 700; }
.brand-icon {
  position: relative;
  width: 31px;
  height: 31px;
  display: inline-block;
}
.brand-icon i {
  position: absolute;
  top: 2px;
  left: 0;
  width: 21px;
  height: 24px;
  background: var(--iris);
  border-radius: 8px 8px 8px 2px;
  transform: rotate(-8deg);
}
.brand-icon i:last-child {
  left: 10px;
  top: 7px;
  background: var(--moss);
  border: 2px solid var(--paper);
  transform: rotate(8deg);
}

.site-nav {
  display: flex;
  gap: 30px;
  font-size: 15px;
  color: var(--muted);
}
.site-nav a:hover { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
}
.header-actions .plain-link { color: var(--muted); }
.header-actions .plain-link:hover { color: var(--ink); }

/* ---------- 首屏 ---------- */
.hero { padding: 68px 0 44px; }

/* 标题上面那一行小字：只说「这是什么、给谁用」，顺便把 OPC 解释掉 */
.hero-kicker {
  font-size: 15px;
  font-weight: 600;
  color: var(--moss);
}

.hero h1 {
  margin-top: 16px;
  font-size: clamp(42px, 6.2vw, 76px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.035em;
}
/* 标题里的两半：各自不拆开，放不下时整半句一起换行 */
.hero h1 .keep { display: inline-block; }

/* 标题下面分两栏：左边主张和一段话，右边是安装入口 */
.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 56px;
  align-items: start;
  margin-top: 26px;
}
/* 主张：大标题下面的第一句，比正文大一号、用正文黑，让人先读到它 */
.hero-claim {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.01em;
}
.hero-sub {
  margin-top: 10px;
  font-size: 19px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 30em;
}

/* 安装入口：一个能复制的包名，下面一行说去哪里粘贴 */
.install-label {
  font-size: 14px;
  font-weight: 600;
}
.package-box {
  display: flex;
  align-items: stretch;
  margin-top: 10px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
}
.package-box code {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-family: var(--mono);
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.package-box button {
  border: 0;
  border-left: 1.5px solid var(--ink);
  padding: 0 20px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.package-box button:hover { background: #343c36; }
.install-how {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

/* 安装入口下面的几条事实：免费、用现成额度、数据在本机、运行条件 */
.hero-facts {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.hero-facts li {
  position: relative;
  padding-left: 16px;
}
.hero-facts li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--moss);
}

/* ---------- 办公室：整页的主角。上面一行标题，中间是整幅截图，下面是图例 ---------- */
.office-stage {
  margin-top: 44px;
  padding: 28px;
  background: var(--mint-wash);
  border: 1px solid #d5e6da;
  border-radius: 20px;
}
.office-head {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 16px 40px;
  align-items: end;
  margin-bottom: 20px;
}
.office-head h2 {
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: -.02em;
}
.office-head p {
  font-size: 15px;
  color: var(--muted);
}
.office-shot {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #c9dccf;
  background: var(--card);
}
.office-shot img { width: 100%; height: auto; }

/* 截图上的编号圆点：位置用百分比，图片缩放时圆点跟着走 */
.pin {
  position: absolute;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--plate);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 22px;
  text-align: center;
  box-shadow: 2px 2px 0 var(--ink);
}

/* 图例：三列，编号和截图上的圆点长得一样，一眼能对上 */
.legend-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 36px;
  margin-top: 22px;
}
.legend-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  font-size: 15px;
  line-height: 1.7;
}
.legend-list .num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--plate);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 22px;
  text-align: center;
}
.legend-list b { font-weight: 600; }
.legend-list span { color: var(--muted); }
.shot-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 各节通用：标题和导语 ---------- */
.section { padding: 96px 0 0; }
.section-title {
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.03em;
  max-width: 18em;
}
.section-lead {
  margin-top: 14px;
  font-size: 17px;
  color: var(--muted);
  max-width: 38em;
  /* 让浏览器尽量把最后一行排得好看一点，不留孤零零的一两个字 */
  text-wrap: pretty;
}

/* ---------- 管得住：左边三件你能定的事，右边是用量页的截图 ---------- */
.control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: 56px;
  align-items: start;
  margin-top: 44px;
}
/* 三件事竖着排，每件上面一条线，不做卡片 */
.reasons {
  display: grid;
  gap: 30px;
}
.reasons > div { padding-top: 22px; border-top: 1.5px solid var(--ink); }
.reasons h3 { font-size: 21px; font-weight: 600; line-height: 1.45; letter-spacing: -.01em; }
.reasons p { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* ---------- 交代一句：四步横着排。这是真的先后顺序，所以用编号 ---------- */
.relay-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: 44px;
  counter-reset: step;
}
.relay-steps li {
  position: relative;
  padding-top: 46px;
  counter-increment: step;
}
.relay-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 27px;
  text-align: center;
}
.relay-steps b {
  display: block;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}
.relay-steps span {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- 截图外框：给真实截图配一个白底圆角的框，下面一行说明 ---------- */
.shot-frame {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: 0 24px 60px -28px rgba(38, 50, 35, .28), 0 2px 6px rgba(38, 50, 35, .05);
  overflow: hidden;
}
.shot-frame img { width: 100%; height: auto; }
/* 宽截图：和上面的四步之间留出距离 */
.shot-frame.wide { margin-top: 40px; }
/* 窄屏上允许左右滑着看宽截图，字不会缩得看不清 */
.shot-scroll { overflow-x: auto; }
.shot-caption {
  padding: 12px 18px;
  border-top: 1px solid var(--rule);
  background: var(--wash);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 小脸头像：纯 CSS 画的，和旧页面一样，不用图片也不用表情符号 ---------- */
.face {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 38px;
  border-radius: 11px;
  background: var(--lavender);
  color: var(--iris);
  box-shadow: inset 0 -3px 0 rgba(32, 38, 34, .06);
  flex-shrink: 0;
}
/* 两只眼睛 */
.face::before,
.face::after {
  content: "";
  position: absolute;
  top: 13px;
  left: 10px;
  width: 4px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
}
.face::after { left: 22px; }
/* 嘴 */
.face i {
  position: absolute;
  left: 14px;
  top: 24px;
  width: 8px;
  height: 3px;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 5px 5px;
}
.face.mint { background: var(--mint); color: var(--moss); }
.face.apricot { background: var(--apricot); color: var(--apricot-ink); }

/* ---------- 角色：按组排成一张「花名册」 ---------- */
.roster {
  margin-top: 40px;
  border-top: 1.5px solid var(--ink);
}
/* 一组一行：左边组名，右边这一组的角色 */
.roster-group {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}
.roster-group h3 { font-size: 18px; font-weight: 600; line-height: 1.5; }
.roster-group h3 + p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.roster-roles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 28px;
}
.roster-roles b { display: block; font-size: 16px; font-weight: 600; }
/* 只选 li 的直接子元素 span（那句介绍），不要把名字后面的「推荐」小标也拉成一整行 */
.roster-roles li > span { display: block; font-size: 14px; color: var(--muted); line-height: 1.65; }
/* 「推荐」小标：第一次用建议先选的两位 */
.pick {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border: 1.5px solid var(--ink);
  background: var(--plate);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  vertical-align: 2px;
}
.roster-note { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- 开始：三步 ---------- */
.start-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 44px;
  counter-reset: go;
}
.start-steps > li {
  padding: 26px 24px 28px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  counter-increment: go;
}
.start-steps > li::before {
  content: counter(go);
  display: block;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--moss);
}
.start-steps h3 { margin-top: 8px; font-size: 20px; font-weight: 600; }
.start-steps p { margin-top: 8px; font-size: 15px; color: var(--muted); }
.start-steps .package-box { margin-top: 14px; }
.start-steps .package-box code { font-size: 14px; padding: 10px 12px; }
.start-steps .package-box button { padding: 0 14px; font-size: 14px; }

/* ---------- 边界与问答：左边几条边界，右边常见问题 ---------- */
.honest {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 72px;
  margin-top: 44px;
}
.honest h3 { font-size: 20px; font-weight: 600; }
.limit-list { display: grid; gap: 14px; margin-top: 18px; }
.limit-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--muted);
}
.limit-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .8em;
  width: 7px;
  height: 1.5px;
  background: var(--ink);
}
.limit-list a { color: var(--iris); text-decoration: underline; text-underline-offset: 3px; }

.faq details { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.faq details:first-of-type { padding-top: 0; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
/* 右边的加号：展开后变成减号 */
.faq .plus { position: relative; width: 13px; height: 13px; flex-shrink: 0; }
.faq .plus::before,
.faq .plus::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 13px;
  height: 1.5px;
  background: var(--muted);
}
.faq .plus::after { transform: rotate(90deg); transition: transform .2s; }
.faq details[open] .plus::after { transform: rotate(0); }
.faq details p { margin-top: 10px; padding-right: 30px; font-size: 15px; color: var(--muted); }

/* ---------- 结尾：再给一次安装入口 ---------- */
.closing {
  margin-top: 96px;
  padding: 52px 40px 56px;
  text-align: center;
  background: var(--iris-wash);
  border: 1px solid var(--lavender);
  border-radius: 20px;
}
.closing .faces { display: flex; justify-content: center; gap: 8px; }
.closing h2 {
  margin-top: 20px;
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.03em;
}
.closing p { margin-top: 12px; font-size: 16px; color: var(--muted); }
.closing .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- 页脚 ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 30px;
  padding: 36px 0 40px;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .wordmark { font-size: 18px; color: var(--ink); }
.site-footer nav { display: flex; gap: 22px; }
.site-footer nav a:hover { color: var(--ink); }

/* ---------- 复制成功后的小提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 50;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 中等宽度（平板、小笔记本） ---------- */
@media (max-width: 1100px) {
  .container { width: calc(100% - 48px); }
  .hero-row { gap: 36px; }
  .office-stage { padding: 20px; }
  .office-head { grid-template-columns: 1fr; gap: 6px; }
  .legend-list { grid-template-columns: 1fr 1fr; gap: 14px 28px; }
  .control { gap: 36px; }
  .relay-steps { grid-template-columns: 1fr 1fr; gap: 26px 28px; }
  .honest { gap: 44px; }
  .roster-group { grid-template-columns: 180px 1fr; gap: 24px; }
}

/* ---------- 窄屏（手机） ---------- */
@media (max-width: 780px) {
  body { font-size: 15px; }
  .container { width: calc(100% - 36px); }
  .site-nav { display: none; }
  .site-header .bar { height: 62px; }
  .header-actions .plain-link { display: none; }

  .hero { padding: 40px 0 28px; }
  .hero-row { grid-template-columns: 1fr; gap: 26px; }
  .hero-claim { font-size: 21px; }
  .hero-sub { font-size: 17px; }

  .office-stage { margin-top: 30px; padding: 14px; border-radius: 16px; }
  .office-head h2 { font-size: 22px; }
  .legend-list { grid-template-columns: 1fr; }
  /* 手机上圆点小一号，免得盖住画面 */
  .pin { width: 18px; height: 18px; margin: -9px 0 0 -9px; font-size: 10px; line-height: 14px; box-shadow: 1px 1px 0 var(--ink); }

  .section { padding-top: 68px; }
  .control { grid-template-columns: 1fr; margin-top: 30px; }
  .relay-steps { grid-template-columns: 1fr; gap: 22px; margin-top: 30px; }
  .relay-steps li { padding-top: 0; padding-left: 46px; }
  .relay-steps li::before { top: 2px; }
  /* 宽截图在手机上保持至少 760px 宽，左右滑着看 */
  .shot-scroll img { min-width: 760px; }

  .roster-group { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .roster-roles { grid-template-columns: 1fr 1fr; gap: 16px 20px; }

  .start-steps { grid-template-columns: 1fr; margin-top: 30px; }
  .honest { grid-template-columns: 1fr; gap: 40px; margin-top: 30px; }

  .closing { margin-top: 68px; padding: 36px 20px 40px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .roster-roles { grid-template-columns: 1fr; }
  .package-box code { font-size: 14px; padding: 12px; }
  .package-box button { padding: 0 14px; }
}

/* ---------- 系统设置了「减少动态效果」的人：不做滚动动画 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
