:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #232624;
  background: #f7f5ef;
  font-synthesis: none;
  --docs-accent: #0a9f7a;
  --docs-border: #dcd9cf;
  --docs-muted: #6f746f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f7f5ef; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
code { border-radius: 5px; background: #ece9e1; padding: 0.14em 0.38em; color: #3d403d; font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.9em; }

.docs-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border-bottom: 1px solid var(--docs-border);
  background: rgba(247, 245, 239, 0.96);
  padding: 0 28px;
  backdrop-filter: blur(16px);
}

.docs-brand { display: flex; align-items: center; gap: 10px; }
.docs-brand img { width: 32px; height: 32px; object-fit: contain; }
.docs-brand strong { font-size: 17px; letter-spacing: 0.04em; }
.docs-brand span { border-left: 1px solid #c9c6bd; margin-left: 4px; padding-left: 14px; color: var(--docs-muted); font-size: 13px; }
.docs-topbar nav { display: flex; align-items: stretch; gap: 28px; min-height: 64px; }
.docs-topbar nav a { display: flex; align-items: center; border-bottom: 2px solid transparent; color: #555a56; font-size: 14px; }
.docs-topbar nav a:hover, .docs-topbar nav a.is-active { border-color: var(--docs-accent); color: #171a18; }

.docs-layout { display: grid; grid-template-columns: 250px minmax(0, 850px) 170px; justify-content: center; gap: 46px; max-width: 1460px; margin: 0 auto; }
.docs-sidebar, .docs-toc { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); overflow: auto; padding: 38px 0 60px; }
.docs-sidebar { border-right: 1px solid var(--docs-border); }
.docs-sidebar p { margin: 24px 28px 8px 0; color: #272a28; font-size: 13px; font-weight: 750; letter-spacing: 0.04em; }
.docs-sidebar p:first-child { margin-top: 0; }
.docs-sidebar a { display: block; margin-right: 18px; border-left: 2px solid transparent; padding: 7px 14px; color: #6a6f6b; font-size: 13px; line-height: 1.35; }
.docs-sidebar a:hover { border-color: var(--docs-accent); color: #171a18; }
.docs-toc { color: #737873; font-size: 12px; }
.docs-toc p { margin: 0 0 12px; color: #2f3330; font-weight: 750; }
.docs-toc a { display: block; padding: 5px 0; }
.docs-toc a:hover { color: var(--docs-accent); }

.docs-content { min-width: 0; padding: 70px 0 120px; }
.docs-content section { scroll-margin-top: 92px; border-bottom: 1px solid var(--docs-border); padding: 0 0 64px; margin: 0 0 64px; }
.docs-content h1 { max-width: 780px; margin: 10px 0 22px; font-size: clamp(42px, 6vw, 68px); line-height: 1.05; letter-spacing: -0.055em; }
.docs-content h2 { margin: 8px 0 20px; color: #202321; font-size: clamp(30px, 4vw, 42px); line-height: 1.16; letter-spacing: -0.035em; }
.docs-content h3 { margin: 30px 0 10px; font-size: 20px; line-height: 1.35; }
.docs-content p, .docs-content li { color: #505551; font-size: 16px; line-height: 1.85; }
.docs-content p { margin: 0 0 18px; }
.docs-content ul, .docs-content ol { padding-left: 24px; }
.docs-content strong { color: #272b28; }
.docs-eyebrow, .docs-section-label { color: var(--docs-accent) !important; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px !important; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.docs-lead { max-width: 760px; color: #4a4f4b !important; font-size: 19px !important; line-height: 1.75 !important; }

.docs-quick-links { display: grid; grid-template-columns: repeat(3, 1fr); margin: 34px 0 42px; border-block: 1px solid var(--docs-border); }
.docs-quick-links a { display: grid; gap: 12px; padding: 20px 18px; border-right: 1px solid var(--docs-border); }
.docs-quick-links a:last-child { border-right: 0; }
.docs-quick-links a:hover { background: #efede5; }
.docs-quick-links b { color: var(--docs-accent); font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; }
.docs-quick-links span { font-size: 14px; font-weight: 700; }

.docs-figure { margin: 34px 0; overflow: hidden; border: 1px solid #c9c5ba; background: #ece9e1; box-shadow: 8px 8px 0 #dedbd2; }
.docs-figure img { display: block; width: 100%; }
.docs-figure figcaption { border-top: 1px solid #d2cec4; padding: 12px 16px; color: #6c716d; font-size: 12px; line-height: 1.55; }
.docs-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.docs-gallery .docs-figure { margin: 24px 0; }
.docs-gallery-mobile { align-items: center; }
.docs-gallery-mobile .docs-figure img { max-height: 620px; object-fit: contain; }

.docs-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 28px 0; }
.docs-columns article { border-top: 3px solid #252926; background: #efede5; padding: 24px; }
.docs-columns article h3 { margin-top: 0; }
.docs-columns article p, .docs-columns article li { font-size: 14px; }
.docs-note { display: grid; grid-template-columns: 120px 1fr; gap: 18px; margin: 28px 0; border-left: 3px solid var(--docs-accent); background: #eceae2; padding: 18px 20px; }
.docs-note strong { font-size: 13px; }
.docs-note span { color: #5f645f; font-size: 13px; line-height: 1.7; }

.docs-steps { margin: 30px 0; border-top: 1px solid var(--docs-border); }
.docs-steps > div { display: grid; grid-template-columns: 42px 1fr; gap: 16px; border-bottom: 1px solid var(--docs-border); padding: 17px 0; }
.docs-steps b { color: var(--docs-accent); font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.docs-steps span { color: #5a5f5b; font-size: 14px; line-height: 1.65; }
.docs-steps strong { display: block; margin-bottom: 2px; }
.docs-numbered { margin: 26px 0; padding: 0 !important; list-style: none; counter-reset: docs-step; }
.docs-numbered li { display: grid; grid-template-columns: 32px 1fr; gap: 14px; border-bottom: 1px solid var(--docs-border); padding: 13px 0; counter-increment: docs-step; }
.docs-numbered li::before { color: var(--docs-accent); font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; content: "0" counter(docs-step); }

.docs-table-wrap { margin: 30px 0; overflow-x: auto; border-block: 1px solid #c9c5ba; }
.docs-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.docs-content th, .docs-content td { border-bottom: 1px solid var(--docs-border); padding: 14px 12px; text-align: left; vertical-align: top; }
.docs-content th { color: #262a27; font-size: 12px; }
.docs-content td { color: #5b605c; line-height: 1.6; }
.docs-content td:first-child { color: #272b28; font-weight: 700; white-space: nowrap; }
.docs-flow { display: flex; align-items: center; gap: 10px; overflow-x: auto; margin: 28px 0; padding: 18px 0; border-block: 1px solid var(--docs-border); white-space: nowrap; }
.docs-flow span { color: #3f4440; font-size: 13px; font-weight: 700; }
.docs-flow i { color: var(--docs-accent); font-style: normal; }

.docs-content details { border-bottom: 1px solid var(--docs-border); padding: 16px 0; }
.docs-content summary { cursor: pointer; color: #303431; font-size: 16px; font-weight: 700; }
.docs-content details p { margin: 14px 0 0; font-size: 14px; }
.docs-footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; border-top: 3px solid #242825; padding-top: 30px; }
.docs-footer strong { font-size: 22px; }
.docs-footer p { margin: 4px 0 0; font-size: 13px; }
.docs-footer > a { flex: 0 0 auto; background: #202522; padding: 13px 18px; color: #fff; font-size: 13px; font-weight: 750; }
.docs-footer > a:hover { background: var(--docs-accent); }

@media (max-width: 1180px) {
  .docs-layout { grid-template-columns: 220px minmax(0, 820px); gap: 34px; padding-right: 24px; }
  .docs-toc { display: none; }
}

@media (max-width: 820px) {
  .docs-topbar { min-height: 58px; padding: 0 16px; }
  .docs-topbar nav { min-height: 58px; gap: 16px; }
  .docs-topbar nav a:nth-child(2), .docs-topbar nav a:nth-child(4), .docs-brand span { display: none; }
  .docs-layout { display: block; padding: 0; }
  .docs-sidebar { position: relative; top: auto; display: flex; gap: 6px; max-height: none; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--docs-border); padding: 12px 16px; white-space: nowrap; }
  .docs-sidebar p { display: none; }
  .docs-sidebar a { margin: 0; border: 1px solid #d2cec4; padding: 7px 10px; font-size: 12px; }
  .docs-content { padding: 46px 20px 80px; }
  .docs-content section { margin-bottom: 48px; padding-bottom: 48px; }
  .docs-quick-links, .docs-columns, .docs-gallery { grid-template-columns: 1fr; }
  .docs-quick-links a { border-right: 0; border-bottom: 1px solid var(--docs-border); }
  .docs-quick-links a:last-child { border-bottom: 0; }
  .docs-note { grid-template-columns: 1fr; gap: 5px; }
  .docs-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .docs-brand strong { font-size: 14px; }
  .docs-topbar nav { gap: 11px; }
  .docs-topbar nav a { font-size: 12px; }
  .docs-content h1 { font-size: 40px; }
  .docs-content h2 { font-size: 31px; }
  .docs-content p, .docs-content li { font-size: 15px; }
  .docs-figure { box-shadow: 5px 5px 0 #dedbd2; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
