/* 潜木 AI 工作台 · 下载页 + 使用文档
   配色沿用程序的「图纸台」：纸色底、墨色字、潜木蓝只用在小字、细线和链接上；跟随系统切换纸 / 墨 */
@import url('fonts/noto-serif-sc/index.css');

:root {
  --bg: #f4f1ea;
  --panel: #fbfaf6;
  --side: #efebe2;
  --text: #1d1c1a;
  --muted: #5e5a52;
  --faint: #8a857b;
  --line: #ddd7cb;
  --line-soft: #e8e3d8;
  --blue: #4f5fd9;
  --blue-deep: #3a48b8;
  --blue-soft: #e7e9fb;
  --rose: #c21a62;
  --btn: #1d1c1a;
  --on-btn: #f4f1ea;
  --shadow: 0 1px 2px rgba(29, 28, 26, 0.05), 0 4px 16px rgba(29, 28, 26, 0.06);
  --shadow-lg: 0 24px 64px -24px rgba(29, 28, 26, 0.28), 0 2px 6px rgba(29, 28, 26, 0.06);
  --serif: 'Noto Serif SC Variable', 'Source Han Serif SC', 'Songti SC', serif;
  --sans: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --mono: 'Cascadia Mono', 'JetBrains Mono', Consolas, 'Microsoft YaHei UI', monospace;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15161c;
    --panel: #1c1e26;
    --side: #111217;
    --text: #ece9e2;
    --muted: #a9a59c;
    --faint: #77746d;
    --line: #2c2f3a;
    --line-soft: #24262f;
    --blue: #8c98ff;
    --blue-deep: #b3bbff;
    --blue-soft: #262a4d;
    --rose: #ff5c9a;
    --btn: #ece9e2;
    --on-btn: #15161c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  color: var(--blue-deep);
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}
.mono {
  font-family: var(--mono);
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* —— 顶栏 —— */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.top.scrolled {
  border-bottom-color: var(--line);
}
.top .wrap {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand:hover {
  color: var(--text);
}
.brand svg {
  width: 23px;
  height: 22px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
}
.nav a {
  color: var(--muted);
}
.nav a:hover,
.nav a.on {
  color: var(--text);
}
.mark-ink {
  stroke: var(--text);
}
.mark-blue {
  stroke: var(--blue);
}

/* —— 按钮：墨色实底胶囊 + 细边空心胶囊 —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid var(--btn);
  font: 600 15px/1 var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.btn.primary {
  background: var(--btn);
  color: var(--on-btn);
}
.btn.primary:hover {
  color: var(--on-btn);
  transform: translateY(-1px);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn.ghost:hover {
  color: var(--text);
  border-color: var(--text);
}
.btn.small {
  height: 34px;
  padding: 0 16px;
  font-size: 13px;
}
.btn[aria-disabled='true'] {
  opacity: 0.45;
  pointer-events: none;
}

/* —— 首屏 —— */
.hero {
  text-align: center;
  padding: 72px 0 56px;
}
.hero-mark {
  width: 92px;
  height: 88px;
  margin: 0 auto 26px;
  display: block;
}
/* logo 一笔画出来：碗 → 竖笔 → 刻线（ref：b.ai 开屏） */
.hero-mark path {
  stroke-dasharray: 1 1.1;
  stroke-dashoffset: 1.05;
  animation: draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.hero-mark .m2 {
  animation-delay: 0.7s;
  animation-duration: 0.6s;
}
.hero-mark .m3 {
  animation-delay: 1.15s;
  animation-duration: 0.35s;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
.eyebrow {
  margin: 0 0 14px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue);
}
.hero h1 {
  margin: 0;
  font: 600 56px/1.2 var(--serif);
  letter-spacing: 0.04em;
}
.lede {
  max-width: 34em;
  margin: 20px auto 0;
  text-wrap: balance;
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
}
.cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.dl-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0.02em;
}
.dl-meta span {
  white-space: nowrap;
}
.dl-meta span + span::before {
  content: '·';
  margin: 0 8px;
}
.rise {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.rise.d1 {
  animation-delay: 0.9s;
}
.rise.d2 {
  animation-delay: 1s;
}
.rise.d3 {
  animation-delay: 1.1s;
}
.rise.d4 {
  animation-delay: 1.25s;
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-mark path,
  .rise {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
    transform: none;
  }
}

/* 程序窗口 */
.window {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}
.window img {
  width: 100%;
}
.hero-shot {
  max-width: 1080px;
  margin: 0 auto;
}

/* —— 栏目 —— */
/* .wrap 的 margin: 0 auto 会盖掉普通的 section 选择器，所以写 section.wrap */
section.wrap {
  margin-top: 112px;
}
.sec-head {
  text-align: center;
  margin-bottom: 56px;
}
.label {
  display: block;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue);
}
.sec-head h2 {
  margin: 14px 0 0;
  font: 600 36px/1.35 var(--serif);
  letter-spacing: 0.03em;
}
.rule {
  display: block;
  width: 40px;
  height: 2px;
  margin: 22px auto 0;
  background: var(--blue);
}

/* 功能：左文右图，隔行对调 */
.feature {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: center;
  padding: 40px 0;
}
.feature + .feature {
  border-top: 1px solid var(--line-soft);
}
.feature.flip .f-text {
  order: 2;
}
.num {
  font: 500 13px/1 var(--mono);
  color: var(--blue);
  letter-spacing: 0.08em;
}
.feature h3 {
  margin: 14px 0 14px;
  font: 600 28px/1.4 var(--serif);
  letter-spacing: 0.02em;
}
.feature p {
  margin: 0;
  color: var(--muted);
}
.ticks {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.ticks li {
  position: relative;
  padding-left: 22px;
  margin: 8px 0;
  font-size: 15px;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.82em;
  width: 9px;
  height: 1.5px;
  background: var(--blue);
}

/* 还有这些：小卡片 */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.card {
  background: var(--panel);
  padding: 30px 28px 32px;
}
.card svg {
  width: 26px;
  height: 26px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card svg .b {
  stroke: var(--blue);
}
.card h4 {
  margin: 18px 0 8px;
  font: 600 18px/1.4 var(--serif);
}
.card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* 安装三步 */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: s;
}
.step {
  padding: 28px 28px 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.step .num {
  font-size: 22px;
}
.step h4 {
  margin: 14px 0 8px;
  font: 600 20px/1.4 var(--serif);
}
.step p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}
.note {
  margin: 28px auto 0;
  max-width: 760px;
  text-align: center;
  font-size: 14px;
  color: var(--faint);
}
.note b {
  color: var(--muted);
  font-weight: 600;
}

/* 结尾下载条 */
.end {
  margin-top: 112px;
  padding: 72px 0;
  text-align: center;
  border-top: 1px solid var(--line);
  background: var(--side);
}
.end h2 {
  margin: 0 0 28px;
  font: 600 30px/1.4 var(--serif);
  letter-spacing: 0.03em;
}

/* 页脚 */
.foot {
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--faint);
}
.foot .wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 18px;
  padding-bottom: 18px;
}
.foot .spacer {
  flex: 1;
}
.foot a {
  color: var(--muted);
}
.sha {
  font-family: var(--mono);
  font-size: 12px;
  word-break: break-all;
}

/* ======================= 使用文档 ======================= */
.doc {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  padding-top: 40px;
  padding-bottom: 96px;
}
.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
  font-size: 14px;
  padding-right: 6px;
}
.toc .label {
  margin: 6px 0 14px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.toc a {
  display: block;
  padding: 5px 0 5px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  line-height: 1.5;
}
.toc a:hover {
  color: var(--text);
}
.toc a.on {
  color: var(--text);
  border-left-color: var(--blue);
  font-weight: 600;
}
.toc-mobile {
  display: none;
}
article {
  max-width: 760px;
}
article > header {
  padding-bottom: 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
article h1 {
  margin: 12px 0 10px;
  font: 600 40px/1.3 var(--serif);
  letter-spacing: 0.03em;
}
article > header p {
  margin: 0;
  color: var(--muted);
}
article h2 {
  margin: 64px 0 18px;
  font: 600 26px/1.4 var(--serif);
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
article h2 .num {
  font-size: 13px;
}
article h3 {
  margin: 32px 0 10px;
  font: 600 17px/1.5 var(--sans);
}
article p,
article li {
  color: var(--text);
}
article p {
  margin: 10px 0;
}
article ul,
article ol {
  margin: 10px 0;
  padding-left: 1.4em;
}
article li {
  margin: 6px 0;
}
article li::marker {
  color: var(--faint);
}
article code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--side);
  border: 1px solid var(--line-soft);
  word-break: break-all;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--panel);
  font: 500 0.82em/1.6 var(--mono);
  text-align: center;
  color: var(--text);
}
.ui {
  font-weight: 600;
}
.tip {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--blue-soft);
  font-size: 15px;
}
.tip b {
  color: var(--blue-deep);
}
.tip.warn {
  background: var(--side);
  border: 1px solid var(--line);
}
.rose {
  color: var(--rose);
  font-weight: 600;
}
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}
article th,
article td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
article th {
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
  border-bottom-color: var(--text);
}
article td:first-child {
  white-space: nowrap;
}
article figure {
  margin: 22px 0;
}
article figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--faint);
  text-align: center;
}
.back-top {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--faint);
}

/* ======================= 手机 ======================= */
@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .feature.flip .f-text {
    order: 0;
  }
  .grid,
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .doc {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .toc {
    display: none;
  }
  .toc-mobile {
    display: block;
    margin: 0 0 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
  }
  .toc-mobile summary {
    padding: 12px 16px;
    font-weight: 600;
    cursor: pointer;
  }
  .toc-mobile ol {
    margin: 0;
    padding: 0 16px 14px 36px;
    columns: 2;
    font-size: 14px;
  }
  .toc-mobile li {
    margin: 4px 0;
  }
}
@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }
  .nav {
    gap: 16px;
  }
  .nav .hide-s {
    display: none;
  }
  .hero {
    padding: 48px 0 40px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .lede {
    font-size: 16px;
  }
  .sec-head h2 {
    font-size: 28px;
  }
  section.wrap {
    margin-top: 80px;
  }
  .grid,
  .steps {
    grid-template-columns: 1fr;
  }
  .feature h3 {
    font-size: 24px;
  }
  article h1 {
    font-size: 32px;
  }
  article h2 {
    font-size: 22px;
  }
  article td:first-child {
    white-space: normal;
  }
  .toc-mobile ol {
    columns: 1;
  }
}
