:root {
  --page: #f7f6f2;
  --surface: #fffefa;
  --ink: #24231f;
  --muted: #78756e;
  --quiet: #a39f96;
  --line: #dedbd3;
  --line-strong: #cbc7bd;
  --dark: #25231e;
  --green: #19a957;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); }
a { color: inherit; }
.docs-topbar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 14px clamp(22px, 4vw, 62px); border-bottom: 1px solid var(--line); background: rgba(255,254,250,.92); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 900; letter-spacing: 1.2px; text-decoration: none; white-space: nowrap; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .8px; }
.brand-mark { position: relative; display: grid; width: 37px; height: 37px; place-items: center; background: var(--green); }
.brand-mark::before { width: 19px; height: 14px; border: 4px solid #fff; content: ""; }
.brand-mark i { position: absolute; width: 17px; height: 6px; background: #b8f36b; transform: skewX(-35deg); }
.docs-topbar nav { display: flex; align-items: center; gap: 20px; }
.docs-topbar nav a { color: var(--muted); font-size: 13px; text-decoration: none; }
.docs-topbar nav a:hover { color: var(--ink); }
.docs-topbar nav .github-link { color: var(--ink); font-weight: 750; }
.docs-topbar nav .social-link { color: var(--ink); font-weight: 800; }
.docs-topbar nav .social-link::after { display: inline-block; margin-left: 4px; color: var(--green); content: "↗"; font-size: 10px; }
.language-switch { display: inline-grid; grid-template-columns: repeat(2, 1fr); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); }
.language-switch[hidden] { display: none; }
.language-switch button { min-width: 58px; min-height: 30px; padding: 0 9px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.language-switch button:last-child { border-right: 0; }
.language-switch button:hover, .language-switch button:focus-visible { color: var(--ink); }
.language-switch button[aria-pressed="true"] { background: var(--dark); color: #fff; font-weight: 750; }
.docs-layout { display: grid; grid-template-columns: minmax(190px, 250px) minmax(0, 820px); gap: clamp(34px, 7vw, 100px); width: min(1240px, 100%); margin: 0 auto; padding: 62px clamp(22px, 4vw, 60px) 100px; }
.docs-sidebar { position: sticky; top: 30px; align-self: start; }
.back-link { display: inline-block; margin-bottom: 52px; color: var(--muted); font-size: 13px; text-decoration: none; }
.back-link:hover { color: var(--green); }
.sidebar-kicker { margin: 0 0 12px; color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: 1.15px; }
.docs-sidebar h1 { max-width: 220px; margin: 0; font-size: 25px; line-height: 1.25; overflow-wrap: anywhere; }
.docs-sidebar > p:last-child { margin-top: 13px; color: var(--quiet); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.markdown-body { min-width: 0; padding: clamp(28px, 5vw, 58px); border: 1px solid var(--line); background: var(--surface); box-shadow: 0 16px 40px rgba(40,36,27,.06); }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { color: var(--ink); line-height: 1.2; }
.markdown-body h1 { margin: 0 0 28px; font-size: clamp(30px, 4vw, 45px); letter-spacing: 0; }
.markdown-body h2 { margin: 46px 0 17px; padding-top: 25px; border-top: 1px solid var(--line); font-size: 25px; }
.markdown-body h3 { margin: 30px 0 12px; font-size: 19px; }
.markdown-body h4 { margin: 24px 0 10px; font-size: 16px; }
.markdown-body p, .markdown-body li { color: #4f4c45; font-size: 15px; line-height: 1.75; }
.markdown-body p { margin: 15px 0; }
.markdown-body ul, .markdown-body ol { margin: 14px 0 20px; padding-left: 25px; }
.markdown-body li + li { margin-top: 5px; }
.markdown-body blockquote { margin: 22px 0; padding: 3px 20px; border-left: 3px solid var(--green); background: #f4f3ec; }
.markdown-body blockquote p { margin: 8px 0; }
.markdown-body code { padding: 2px 6px; border-radius: 4px; background: #f0eee8; color: #554b31; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.markdown-body pre { margin: 20px 0; padding: 18px 20px; overflow: auto; border: 1px solid #37352f; border-radius: 6px; background: #292822; color: #f7f6f2; }
.markdown-body pre code { padding: 0; background: transparent; color: inherit; font-size: 13px; line-height: 1.65; }
.markdown-body hr { margin: 34px 0; border: 0; border-top: 1px solid var(--line); }
.markdown-table-wrap { margin: 20px 0 26px; overflow-x: auto; }
.markdown-body table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; }
.markdown-body th, .markdown-body td { padding: 11px 13px; border: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.55; }
.markdown-body th { background: #f2f1eb; color: var(--ink); font-weight: 800; }
.markdown-body td { color: #5c5952; }
.markdown-body img { max-height: 480px; margin: 22px auto; border: 1px solid var(--line); object-fit: contain; }
.markdown-body a { color: #147c44; text-underline-offset: 3px; }
.markdown-body a:hover { color: var(--ink); }
.loading-state, .error-state { color: var(--muted); }
.error-state { padding: 18px; border-left: 3px solid #c14d42; background: #fbefed; }
@media (max-width: 760px) {
  .docs-topbar { padding: 12px 18px; }
  .brand { gap: 7px; font-size: 13px; }
  .brand-mark { width: 32px; height: 32px; flex: 0 0 32px; }
  .brand small { display: none; }
  .docs-topbar nav { gap: 8px; }
  .docs-topbar nav a { font-size: 11px; }
  .docs-topbar nav > a:not(.github-link):not(.social-link) { display: none; }
  .language-switch button { min-width: 51px; padding-inline: 7px; }
  .docs-layout { display: block; padding: 34px 18px 70px; }
  .docs-sidebar { position: static; margin-bottom: 28px; }
  .back-link { margin-bottom: 24px; }
  .docs-sidebar h1 { max-width: none; font-size: 21px; }
  .markdown-body { padding: 25px 20px; }
  .markdown-body h2 { margin-top: 36px; }
}
