/*
 * withnomi.app 的样式（2.3.10 改版）。颜色、字号、间距对齐应用的 token（packages/ui/src/tokens.css）：
 * 奶油 #FCEFE1、墨色 #33291F、诺米橙 #FB9466，4px 网格，字号 12 / 13 / 14 / 16 / 18 / 22 起步。
 * 页面底色是暖白，奶油色只铺在区块与卡片底上；诺米橙只给主转化（下载），链接与强调用深一档的陶土色。
 * 字体用系统字体栈，不加载网络字体。
 */
:root {
  --bg: #fffbf6;
  --cream: #fcefe1;
  --cream-2: #fdf5ec;
  --surface: #ffffff;
  --ink: #2b231b;
  --ink-2: rgba(43, 35, 27, 0.72);
  --ink-3: rgba(43, 35, 27, 0.66);
  --line: rgba(43, 35, 27, 0.08);
  --line-2: rgba(43, 35, 27, 0.14);
  --orange: #fb9466;
  --orange-hover: #f6814f;
  --orange-soft: rgba(251, 148, 102, 0.14);
  --accent: #b4532a;
  --code-bg: #f7f0e8;
  --focus: #b4532a;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(51, 41, 31, 0.06), 0 24px 64px -24px rgba(51, 41, 31, 0.22);
  --w: 1160px;
  --gutter: 20px;
  --section: 96px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (min-width: 768px) {
  :root {
    --gutter: 40px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}
.wrap {
  width: 100%;
  max-width: calc(var(--w) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 15px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--orange);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--orange-hover);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}
.btn-ghost:hover {
  background: rgba(51, 41, 31, 0.05);
}
.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 251, 246, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}
/* 品牌 | 居中的主导航 | 语言与下载 */
.header-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  height: 64px;
}
.docs-page .header-row {
  max-width: calc(1440px + 2 * var(--gutter));
}
.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  width: 28px;
  height: 28px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
/* 窄屏页头放不下「下载 Nomi」时，它出现在菜单最上面 */
.nav .nav-cta {
  display: none;
}
.nav a:hover {
  color: var(--ink);
  background: rgba(43, 35, 27, 0.05);
}
.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
}
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-toggle {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}
.lang-toggle a {
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.lang-toggle a.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(43, 35, 27, 0.08);
}
.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
@media (max-width: 860px) {
  .header-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -24px rgba(43, 35, 27, 0.3);
  }
  .nav.is-open {
    display: flex;
  }
  .nav a[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 3px;
    height: auto;
  }
  .header-actions {
    gap: 8px;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
@media (max-width: 420px) {
  .header-cta {
    display: none;
  }
  .nav .nav-cta {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-weight: 600;
    text-align: center;
    background: var(--orange);
  }
  .nav .nav-cta:hover {
    background: var(--orange-hover);
  }
}

/* ---------- 区块 ---------- */
.section {
  padding: var(--section) 0;
}
.section + .section {
  padding-top: 0;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}
.h2 {
  font-size: clamp(26px, 3.2vw, 32px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.lead {
  max-width: 40em;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 17px;
}
.section-head {
  margin-bottom: 40px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 var(--section);
  text-align: center;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(251, 148, 102, 0.16), transparent 70%),
    linear-gradient(180deg, var(--cream) 0%, var(--bg) 62%);
  margin-top: -64px;
  padding-top: 136px;
}
.hero h1 {
  max-width: 14em;
  margin: 0 auto;
  font-size: clamp(36px, 5.4vw, 56px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.02em;
}
.hero .lead {
  margin: 20px auto 0;
  max-width: 36em;
  font-size: 18px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}
.platforms {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 14px;
}
.platforms a {
  color: var(--ink-2);
}
.nowrap {
  white-space: nowrap;
}
.shot {
  margin-top: 56px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.shot img,
.shot video {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.hero .shot {
  margin-top: 64px;
}

/* ---------- 三块能力 ---------- */
.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.card-body {
  padding: 24px;
}
.card h3 {
  font-size: 18px;
  font-weight: 650;
  line-height: 1.35;
}
.card p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 15px;
}
.card-crop {
  margin-top: auto;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--cream-2);
}
.card-crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 两处工作面 ---------- */
.surface {
  display: grid;
  gap: 40px;
  align-items: center;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.surface + .surface {
  margin-top: 72px;
}
.surface--flip > :first-child {
  order: 2;
}
.surface .shot {
  margin-top: 0;
}
@media (max-width: 900px) {
  .surface {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .surface--flip > :first-child {
    order: 0;
  }
}
.surface .zoom {
  display: block;
  cursor: zoom-in;
}

/* ---------- 网关四步 ---------- */
.steps {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .steps {
    grid-template-columns: 1fr;
  }
}
.steps li {
  counter-increment: step;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 600;
}
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 8px;
  color: var(--ink-3);
  font-size: 13px;
}
.steps small {
  display: block;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 400;
}

/* ---------- 桌面角色 ---------- */
.mascot {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  align-items: stretch;
  overflow: hidden;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.mascot-copy {
  padding: 56px;
}
.mascot-copy .eyebrow {
  background: var(--surface);
}
.text-link {
  display: inline-block;
  margin-top: 32px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mascot-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 440px;
  padding: 40px 32px 0;
  background:
    radial-gradient(70% 60% at 50% 40%, rgba(251, 148, 102, 0.22), transparent 70%),
    linear-gradient(160deg, #fde7d3 0%, #f9d8bd 100%);
  border-left: 1px solid var(--line);
}
.mascot-window {
  position: absolute;
  left: 32px;
  top: 40px;
  width: 52%;
  height: 46%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 32px -16px rgba(43, 35, 27, 0.25);
}
.mascot-window .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: rgba(43, 35, 27, 0.14);
}
.mascot-stage img {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  margin-left: auto;
  margin-bottom: 18px;
  filter: drop-shadow(0 18px 24px rgba(43, 35, 27, 0.18));
}
.mascot-dock {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 12px;
  height: 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
@media (max-width: 960px) {
  .mascot {
    grid-template-columns: 1fr;
  }
  .mascot-copy {
    padding: 36px 24px;
  }
  .mascot-stage {
    min-height: 360px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .mascot-stage img {
    margin-right: auto;
    width: min(80%, 320px);
  }
}

/* ---------- 下载 ---------- */
.dl {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .dl {
    grid-template-columns: 1fr;
  }
}
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.dl-card.is-current {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}
.dl-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}
.dl-card h3 svg {
  width: 22px;
  height: 22px;
}
.dl-card .tag {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 148, 102, 0.22);
  font-size: 12px;
  font-weight: 600;
}
.dl-card:not(.is-current) .tag {
  display: none;
}
.dl-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.dl-links .btn {
  justify-content: space-between;
}
.dl-links .btn span:last-child {
  color: var(--ink-3);
  font-weight: 500;
  font-size: 13px;
}
.dl-meta {
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 14px;
}
.notes {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .notes {
    grid-template-columns: 1fr;
  }
}
.note {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.note h3 {
  font-size: 16px;
}
.note p,
.note li {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 15px;
}
.note ol {
  margin: 0;
  padding-left: 20px;
}

/* ---------- 文档入口、正文页 ---------- */
.links {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .links {
    grid-template-columns: 1fr;
  }
}
.link-card {
  display: block;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-decoration: none;
}
.link-card:hover {
  border-color: var(--line-2);
}
.link-card h3 {
  font-size: 18px;
}
.link-card p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 15px;
}
.link-card span {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
}
.page-head {
  padding: 64px 0 40px;
}
.page-head h1 {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
}
.prose {
  max-width: 44em;
}
.prose h2 {
  margin: 40px 0 12px;
  font-size: 22px;
}
.prose p,
.prose li {
  color: var(--ink-2);
}
.prose p + p,
.prose ul,
.prose ol {
  margin-top: 12px;
}
.prose li + li {
  margin-top: 6px;
}

/* ---------- 更新日志 ---------- */
.log > * {
  /* 和页头左对齐，只限制行宽 */
  max-width: 52em;
}
.log-entry {
  display: grid;
  gap: 8px 40px;
  grid-template-columns: 160px minmax(0, 1fr);
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.log-entry:first-child {
  border-top: 0;
  padding-top: 0;
}
@media (max-width: 680px) {
  .log-entry {
    grid-template-columns: 1fr;
  }
}
.log-meta {
  color: var(--ink-3);
  font-size: 14px;
}
.log-meta a {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
}
.log-entry h2 {
  font-size: 20px;
  line-height: 1.4;
}
.log-entry ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--ink-2);
}
.log-entry li + li {
  margin-top: 4px;
}
.log-entry h3 {
  margin-top: 16px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- 下载带、页脚 ---------- */
.band {
  padding: 56px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}
.band .hero-actions {
  margin-top: 24px;
}
.site-footer {
  padding: 40px 0 56px;
  background: var(--cream-2);
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}
.footer-row a {
  color: var(--ink-2);
  text-decoration: none;
}
.footer-row a:hover {
  color: var(--ink);
}
.footer-line {
  margin-top: 8px;
}

/* ---------- 大图查看 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(51, 41, 31, 0.72);
  cursor: zoom-out;
}
.lightbox.is-open {
  display: flex;
}
.lightbox img {
  max-height: 100%;
  border-radius: 10px;
}

/* ---------- 文档：侧栏 | 正文 | 本页目录 ---------- */
.wrap-wide {
  width: 100%;
  max-width: calc(1440px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.docs-page .site-footer {
  margin-top: 0;
}
.docs-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 216px;
  gap: 56px;
  align-items: start;
}
.docs-shell--home {
  grid-template-columns: 248px minmax(0, 1fr);
}
.docs-sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 28px 16px 40px 0;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.docs-sidebar-head {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.docs-sidebar-close {
  display: none;
}
.docs-search-trigger {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-3);
  font: 400 14px/1 var(--font);
  cursor: pointer;
  text-align: left;
}
.docs-search-trigger:hover {
  border-color: rgba(43, 35, 27, 0.26);
}
.docs-search-trigger svg,
.docs-search-field svg,
.docs-menu-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.docs-search-trigger span {
  flex: 1;
}
kbd {
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--ink-3);
  font: 500 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.docs-nav-group + .docs-nav-group {
  margin-top: 22px;
}
.docs-nav-group p {
  margin-bottom: 6px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}
.docs-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.docs-nav a {
  display: block;
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none;
}
.docs-nav a:hover {
  color: var(--ink);
  background: rgba(43, 35, 27, 0.04);
}
.docs-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--orange-soft);
  font-weight: 600;
}
.docs-menu-btn {
  display: none;
}
.docs-main {
  min-width: 0;
  max-width: 780px;
  padding: 40px 0 80px;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--ink-3);
  font-size: 14px;
}
.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--accent);
}
.docs-main h1 {
  font-size: clamp(30px, 3.6vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.docs-desc {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.6;
}
.docs-note {
  margin-top: 20px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink-2);
  font-size: 14px;
}

/* 正文排版 */
.doc {
  margin-top: 32px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.75;
}
.doc > :first-child {
  margin-top: 24px;
}
.doc h2,
.doc h3,
.doc h4 {
  position: relative;
  scroll-margin-top: 88px;
  line-height: 1.35;
}
.doc h2 {
  margin: 48px 0 16px;
  font-size: 24px;
  font-weight: 680;
  letter-spacing: -0.01em;
}
.doc h3 {
  margin: 32px 0 12px;
  font-size: 19px;
  font-weight: 650;
}
.doc h4 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 650;
}
.doc .anchor {
  position: absolute;
  left: -1.1em;
  padding-right: 0.3em;
  color: var(--ink-3);
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.doc h2:hover .anchor,
.doc h3:hover .anchor,
.doc h4:hover .anchor {
  opacity: 1;
}
.doc p,
.doc ul,
.doc ol,
.doc .table,
.doc .code,
.doc blockquote {
  margin: 0 0 16px;
}
.doc p,
.doc li {
  color: rgba(43, 35, 27, 0.84);
}
.doc ul,
.doc ol {
  padding-left: 1.4em;
}
.doc li + li,
.doc li > ul,
.doc li > ol {
  margin-top: 6px;
}
.doc li > ul,
.doc li > ol,
.doc li > p {
  margin-bottom: 0;
}
.doc li::marker {
  color: var(--ink-3);
}
.doc strong {
  color: var(--ink);
  font-weight: 650;
}
.doc a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(180, 83, 42, 0.3);
  text-underline-offset: 3px;
}
.doc a:hover {
  text-decoration-color: currentColor;
}
.doc code {
  padding: 0.15em 0.4em;
  border-radius: 5px;
  background: var(--code-bg);
  color: #7a3a1c;
  font: 500 0.88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.doc a code {
  color: inherit;
}
.doc .code {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf6f0;
}
.doc .code[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 8px;
  left: 14px;
  color: var(--ink-3);
  font: 500 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.doc .code pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.doc .code[data-lang] pre {
  padding-top: 30px;
}
.doc .code code {
  padding: 0;
  background: none;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-wrap: normal;
  white-space: pre;
}
.code-copy {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-2);
  font: 500 12px/1.4 var(--font);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.doc .code:hover .code-copy,
.code-copy:focus-visible {
  opacity: 1;
}
.doc .table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  scrollbar-width: thin;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.6;
}
.doc th,
.doc td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.doc th {
  background: var(--cream-2);
  color: var(--ink);
  font-weight: 650;
  white-space: nowrap;
}
.doc tr:last-child td {
  border-bottom: 0;
}
.doc td code {
  white-space: nowrap;
}
.doc blockquote {
  padding: 12px 16px;
  border-left: 3px solid var(--orange);
  border-radius: 0 10px 10px 0;
  background: var(--orange-soft);
}
.doc blockquote p:last-child {
  margin-bottom: 0;
}
.doc img {
  margin: 8px 0;
  max-height: 560px;
  width: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.doc hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.docs-edit {
  margin-top: 48px;
  font-size: 14px;
}
.docs-edit a {
  color: var(--ink-3);
}
.docs-edit a:hover {
  color: var(--accent);
}
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.docs-pager a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.docs-pager a:hover {
  border-color: var(--accent);
}
.docs-pager .next {
  text-align: right;
}
.docs-pager small {
  color: var(--ink-3);
  font-size: 13px;
}
.docs-pager span {
  font-weight: 600;
}

/* 本页目录 */
.docs-toc {
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 44px 0 40px;
  font-size: 13px;
  scrollbar-width: thin;
}
.docs-toc-title {
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 650;
}
.docs-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}
.docs-toc a {
  display: block;
  margin-left: -1px;
  padding: 4px 0 4px 12px;
  border-left: 2px solid transparent;
  color: var(--ink-3);
  line-height: 1.45;
  text-decoration: none;
}
.docs-toc .lv3 a {
  padding-left: 24px;
}
.docs-toc a:hover {
  color: var(--ink);
}
.docs-toc a.is-active {
  border-left-color: var(--orange);
  color: var(--accent);
  font-weight: 600;
}
.docs-toc-top {
  margin-top: 16px;
  padding-left: 0 !important;
  border: 0 !important;
}

/* 文档首页 */
.docs-home .eyebrow {
  margin-bottom: 14px;
}
.docs-home {
  max-width: 960px;
}
.docs-search-trigger--big {
  width: 100%;
  max-width: 560px;
  height: 48px;
  margin-top: 28px;
  padding: 0 12px 0 16px;
  border-radius: 12px;
  font-size: 15px;
  box-shadow: 0 1px 2px rgba(43, 35, 27, 0.05);
}
.docs-home-h {
  margin: 48px 0 16px;
  font-size: 20px;
  font-weight: 650;
}
.docs-featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.docs-feature {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--cream-2);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.docs-feature:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.docs-feature .num {
  color: var(--accent);
  font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.docs-feature strong {
  margin-top: 8px;
  font-size: 17px;
}
.docs-feature span:last-child {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.docs-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.docs-group {
  padding: 20px 20px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.docs-group h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 16px;
}
.docs-group small {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
}
.docs-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.docs-group li + li {
  border-top: 1px solid var(--line);
}
.docs-group a {
  display: block;
  padding: 10px 0;
  text-decoration: none;
}
.docs-group a strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.docs-group a span {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.5;
}
.docs-group a:hover strong {
  color: var(--accent);
}

/* 搜索 */
.docs-search {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
  background: rgba(43, 35, 27, 0.32);
}
.docs-search[hidden] {
  display: none;
}
.docs-search-panel {
  width: 100%;
  max-width: 640px;
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 64px -16px rgba(43, 35, 27, 0.4);
}
.docs-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
}
.docs-search-field input {
  flex: 1;
  height: 56px;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: 400 16px/1 var(--font);
}
.docs-search-field input::-webkit-search-cancel-button {
  display: none;
}
.docs-search-results {
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
}
.docs-search-results:empty {
  display: none;
}
.docs-search-results a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}
.docs-search-results a[aria-selected="true"],
.docs-search-results a:hover {
  background: var(--orange-soft);
}
.docs-search-results small {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
}
.docs-search-results strong {
  display: block;
  font-size: 15px;
}
.docs-search-results span {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.docs-search-results mark {
  background: rgba(251, 148, 102, 0.35);
  color: inherit;
  border-radius: 2px;
}
.docs-search-empty {
  padding: 24px 12px;
  color: var(--ink-3);
  text-align: center;
}

@media (max-width: 1240px) {
  .docs-shell {
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 48px;
  }
  .docs-toc {
    display: none;
  }
}
@media (max-width: 900px) {
  .docs-shell,
  .docs-shell--home {
    display: block;
  }
  .docs-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 55;
    width: min(320px, 86vw);
    height: auto;
    padding: 16px 16px 40px;
    background: var(--bg);
    border-right: 1px solid var(--line);
    box-shadow: 16px 0 48px -24px rgba(43, 35, 27, 0.4);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .docs-sidebar.is-open {
    transform: none;
  }
  .docs-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font-size: 20px;
    cursor: pointer;
  }
  .docs-menu-btn {
    position: sticky;
    top: 64px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    width: calc(100% + 2 * var(--gutter));
    margin: 0 calc(-1 * var(--gutter));
    padding: 10px var(--gutter);
    border: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 251, 246, 0.94);
    color: var(--ink-2);
    font: 500 14px/1.4 var(--font);
    cursor: pointer;
  }
  .docs-main {
    padding-top: 28px;
  }
  .docs-featured,
  .docs-groups {
    grid-template-columns: 1fr;
  }
  .doc .anchor {
    display: none;
  }
}
@media (max-width: 560px) {
  .docs-pager {
    grid-template-columns: 1fr;
  }
}
.docs-scrim {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(43, 35, 27, 0.32);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
