/* Stylesheet for frontend/zh-CN/docs.html */
    :root {
      --bg: #f7f5f2;
      --bg-card: #ffffff;
      --bg-soft: #eef6f4;
      --ink: #16202e;
      --ink-soft: #5c6b7a;
      --accent: #2d9c8a;
      --accent-light: #d4f0eb;
      --accent-dark: #1f7a6c;
      --warm: #e8a87c;
      --warm-light: #fdf0e8;
      --line: #e2e6ea;
      --shadow: 0 4px 24px rgba(22, 32, 46, 0.06);
      --shadow-lg: 0 24px 64px rgba(22, 32, 46, 0.12);
      --font-display: 'Outfit', 'Noto Sans SC', sans-serif;
      --font-body: 'Noto Sans SC', sans-serif;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }

    body {
      font-family: var(--font-body);
      background: var(--bg);
      color: var(--ink);
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
    }

    body.menu-open {
      overflow: hidden;
      height: 100vh;
    }

    a { color: inherit; text-decoration: none; }

    .container {
      width: min(1180px, 92vw);
      margin: 0 auto;
    }

    .reveal {
      opacity: 0;
      transform: translateY(28px);
      transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.visible { opacity: 1; transform: translateY(0); }

    /* Nav */
    .nav-wrap {
      position: fixed;
      top: 20px;
      left: 0;
      right: 0;
      z-index: 100;
      display: flex;
      justify-content: center;
      padding: 0 4vw;
      pointer-events: none;
    }

    .nav-pill {
      pointer-events: auto;
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(255, 255, 255, 0.78);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(255, 255, 255, 0.9);
      box-shadow: 0 8px 32px rgba(22, 32, 46, 0.1);
      border-radius: 999px;
      padding: 8px 10px 8px 18px;
      width: min(920px, 100%);
      justify-content: space-between;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      font-family: var(--font-display);
      font-weight: 700;
      font-size: 1.2rem;
      letter-spacing: -0.02em;
      flex-shrink: 0;
    }

    .logo-mark {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .logo-mark img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 2px;
      list-style: none;
    }

    .nav-links a {
      font-size: 0.86rem;
      font-weight: 500;
      color: var(--ink-soft);
      padding: 8px 14px;
      border-radius: 999px;
      transition: all 0.2s;
    }

    .nav-links a:hover {
      color: var(--accent-dark);
      background: var(--accent-light);
    }

    .nav-links a.active {
      color: #fff;
      background: var(--ink);
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .lang-chip {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.8rem;
      color: var(--ink-soft);
      padding: 8px 14px;
      border-radius: 999px;
      border: 1px solid var(--line);
      cursor: pointer;
      background: #fff;
    }

    .lang-chip i { color: var(--accent); }

.lang-switch { position: relative; }

.lang-chip { cursor: pointer; border: none; font-family: inherit; transition: border-color 0.2s, color 0.2s; }
.lang-chip:hover { border-color: var(--accent); color: var(--accent-dark); }

.lang-caret { font-size: 0.6rem; margin-left: 2px; color: var(--ink-soft); transition: transform 0.2s; }
.lang-switch.open .lang-caret { transform: rotate(180deg); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 120;
}

.lang-switch.open .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

.lang-option:hover:not(:disabled) { background: var(--accent-light); }
.lang-option:disabled { color: var(--ink-soft); cursor: not-allowed; opacity: 0.7; }

.lang-flag { font-size: 1rem; line-height: 1; flex-shrink: 0; }
.lang-option-name { flex: 1; }
.lang-check { color: var(--accent); font-size: 0.8rem; flex-shrink: 0; }

.lang-soon {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  white-space: nowrap;
}


    .nav-gh {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--ink);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      transition: transform 0.2s, background 0.2s;
    }

    .nav-gh:hover {
      transform: rotate(-8deg) scale(1.08);
      background: var(--accent-dark);
    }

    .menu-toggle {
      display: none;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      flex-shrink: 0;
      background: none;
      border: none;
      font-size: 1.1rem;
      color: var(--ink);
      cursor: pointer;
      padding: 0;
    }

    .mobile-menu { display: none; }


    @media (max-width: 1080px) {
      .nav-links { display: none; }
      .menu-toggle { display: flex; }

      .mobile-menu.open {
        display: flex;
        position: fixed;
        top: 86px;
        left: 4vw;
        right: 4vw;
        z-index: 99;
        flex-direction: column;
        gap: 4px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(16px);
        border: 1px solid var(--line);
        border-radius: 20px;
        padding: 14px;
        box-shadow: var(--shadow-lg);
        list-style: none;
      }

      .mobile-menu a {
        display: block;
        padding: 12px 18px;
        border-radius: 12px;
        font-weight: 500;
        color: var(--ink);
      }

      .mobile-menu a:hover,
      .mobile-menu a.active {
        background: var(--accent-light);
        color: var(--accent-dark);
      }
    }

    .btn-major {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      padding: 14px 28px;
      border-radius: 999px;
      background: var(--ink);
      color: #fff;
      font-size: 0.95rem;
      font-weight: 600;
      transition: all 0.25s;
      border: none;
      cursor: pointer;
    }

    .btn-major .arr {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--accent);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 0.7rem;
      transition: transform 0.25s;
    }

    .btn-major:hover {
      background: var(--accent-dark);
      transform: translateY(-3px);
      box-shadow: 0 12px 28px rgba(31, 122, 108, 0.35);
    }

    .btn-major:hover .arr {
      transform: translateX(3px);
      background: rgba(255, 255, 255, 0.22);
    }

    .btn-ghost {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 13px 24px;
      border-radius: 999px;
      border: 1.5px solid var(--ink);
      color: var(--ink);
      font-size: 0.92rem;
      font-weight: 600;
      transition: all 0.25s;
      background: transparent;
    }

    .btn-ghost:hover {
      background: var(--ink);
      color: #fff;
      transform: translateY(-3px);
    }

    /* Hero */
    .docs-hero {
      position: relative;
      padding: 140px 0 56px;
      overflow: hidden;
    }

    .docs-hero-orb {
      position: absolute;
      top: -120px;
      right: -80px;
      width: 420px;
      height: 420px;
      border-radius: 50%;
      background: var(--accent-light);
      filter: blur(80px);
      opacity: 0.55;
      pointer-events: none;
    }

    .docs-hero-inner { position: relative; z-index: 1; }

    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      font-size: 0.82rem;
      font-weight: 600;
      letter-spacing: 0.2em;
      color: var(--accent-dark);
      margin-bottom: 20px;
    }

    .hero-eyebrow .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent);
    }

    .docs-hero h1 {
      font-family: var(--font-display);
      font-size: clamp(2.2rem, 5vw, 3.6rem);
      font-weight: 800;
      line-height: 1.12;
      letter-spacing: -0.03em;
      margin-bottom: 18px;
      max-width: 14em;
    }

    .docs-hero h1 .accent-word {
      background: linear-gradient(120deg, var(--accent) 0%, #3db89e 60%, var(--warm) 110%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .docs-hero .lead {
      max-width: 560px;
      font-size: 1.02rem;
      color: var(--ink-soft);
      line-height: 1.85;
      margin-bottom: 28px;
    }

    .docs-hero .lead strong { color: var(--ink); }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-bottom: 36px;
    }

    .topic-row {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .topic-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 9px 16px;
      border-radius: 999px;
      border: 1.5px solid var(--line);
      background: var(--bg-card);
      font-size: 0.84rem;
      font-weight: 600;
      color: var(--ink);
      transition: all 0.2s;
    }

    .topic-chip:hover {
      border-color: var(--accent);
      color: var(--accent-dark);
      transform: translateY(-2px);
    }

    .topic-chip i { color: var(--accent); font-size: 0.8rem; }

    /* Docs shell: sticky TOC + content */
    .docs-shell {
      padding: 24px 0 96px;
    }

    .docs-layout {
      display: grid;
      grid-template-columns: 220px minmax(0, 1fr);
      gap: 40px;
      align-items: start;
    }

    .docs-toc {
      position: sticky;
      top: 100px;
      max-height: calc(100vh - 120px);
      overflow-y: auto;
      padding: 8px 0;
    }

    .docs-toc .toc-label {
      font-size: 0.7rem;
      font-weight: 700;
      letter-spacing: 0.16em;
      color: var(--ink-soft);
      margin-bottom: 14px;
      padding-left: 12px;
    }

    .docs-toc nav {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .docs-toc a {
      display: block;
      padding: 9px 12px;
      border-radius: 10px;
      font-size: 0.86rem;
      font-weight: 500;
      color: var(--ink-soft);
      border-left: 2px solid transparent;
      transition: all 0.2s;
    }

    .docs-toc a:hover {
      color: var(--accent-dark);
      background: var(--accent-light);
    }

    .docs-toc a.active {
      color: var(--accent-dark);
      background: var(--accent-light);
      border-left-color: var(--accent);
      font-weight: 600;
    }

    .docs-main {
      display: flex;
      flex-direction: column;
      gap: 28px;
      min-width: 0;
    }

    .doc-card {
      background: var(--bg-card);
      border: 1px solid var(--line);
      border-radius: 24px;
      padding: 36px 40px;
      scroll-margin-top: 110px;
      position: relative;
      overflow: hidden;
    }

    .doc-card::before {
      content: '';
      position: absolute;
      top: -60px;
      right: -40px;
      width: 160px;
      height: 160px;
      border-radius: 50%;
      background: var(--accent-light);
      opacity: 0.35;
      pointer-events: none;
    }

    .doc-card > * { position: relative; z-index: 1; }

    .doc-kicker {
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.16em;
      color: var(--accent-dark);
      margin-bottom: 10px;
      display: block;
    }

    .doc-card h2 {
      font-family: var(--font-display);
      font-size: clamp(1.45rem, 2.5vw, 1.85rem);
      font-weight: 700;
      letter-spacing: -0.02em;
      margin-bottom: 14px;
      line-height: 1.25;
    }

    .doc-card > p,
    .doc-card .doc-lead {
      font-size: 0.95rem;
      color: var(--ink-soft);
      line-height: 1.8;
      margin-bottom: 22px;
      max-width: 62ch;
    }

    .doc-card h3 {
      font-size: 1.05rem;
      font-weight: 700;
      margin: 28px 0 12px;
      letter-spacing: -0.01em;
    }

    .doc-card h3:first-of-type { margin-top: 8px; }

    .doc-card ul, .doc-card ol {
      margin: 0 0 18px;
      padding-left: 1.2em;
      color: var(--ink-soft);
      font-size: 0.92rem;
      line-height: 1.85;
    }

    .doc-card li + li { margin-top: 4px; }
    .doc-card li strong { color: var(--ink); }

    code, .kbd {
      font-family: 'Outfit', ui-monospace, monospace;
      font-size: 0.84em;
      font-weight: 600;
      color: var(--accent-dark);
      background: var(--accent-light);
      padding: 1px 7px;
      border-radius: 6px;
      white-space: nowrap;
    }

    .code-block {
      background: #1d2836;
      border-radius: 16px;
      padding: 22px 24px;
      font-family: 'Outfit', ui-monospace, monospace;
      font-size: 0.82rem;
      line-height: 1.85;
      color: #b8c6d4;
      overflow-x: auto;
      margin: 16px 0 8px;
      box-shadow: var(--shadow);
    }

    .code-block .c-cmt { color: #5a6b7d; }
    .code-block .c-key { color: #7fd8c4; }
    .code-block .c-str { color: #e8b075; }
    .code-block .c-val { color: #e8eef4; }
    .code-block .c-num { color: #9ecbff; }

    .param-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.88rem;
      margin: 12px 0 8px;
    }

    .param-table th,
    .param-table td {
      text-align: left;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      vertical-align: top;
      line-height: 1.55;
    }

    .param-table th {
      font-size: 0.72rem;
      font-weight: 700;
      letter-spacing: 0.08em;
      color: var(--ink-soft);
      background: var(--bg);
    }

    .param-table td:first-child {
      font-family: var(--font-display);
      font-weight: 600;
      color: var(--ink);
      white-space: nowrap;
    }

    .param-table td:nth-child(2) {
      color: var(--accent-dark);
      font-family: 'Outfit', monospace;
      font-size: 0.82rem;
      font-weight: 600;
    }

    .param-table td:last-child { color: var(--ink-soft); }

    .callout {
      display: flex;
      gap: 12px;
      align-items: flex-start;
      padding: 14px 16px;
      border-radius: 14px;
      background: var(--bg);
      border: 1px dashed var(--line);
      margin-top: 18px;
      font-size: 0.86rem;
      color: var(--ink-soft);
      line-height: 1.65;
    }

    .callout i {
      color: var(--accent);
      margin-top: 3px;
      flex-shrink: 0;
    }

    .callout.warn {
      background: var(--warm-light);
      border-color: #f0d4bc;
    }

    .callout.warn i { color: #c47a3a; }

    .grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
      margin: 16px 0;
    }

    .mini-card {
      background: var(--bg);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 18px 18px 16px;
      transition: border-color 0.2s, transform 0.2s;
    }

    .mini-card:hover {
      border-color: var(--accent);
      transform: translateY(-2px);
    }

    .mini-card .m-icon {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      background: var(--accent-light);
      color: var(--accent-dark);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 12px;
      font-size: 0.95rem;
    }

    .mini-card h4 {
      font-size: 0.95rem;
      font-weight: 700;
      margin-bottom: 6px;
    }

    .mini-card p {
      font-size: 0.82rem;
      color: var(--ink-soft);
      line-height: 1.65;
      margin: 0;
    }

    .tag-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: 12px 0 4px;
    }

    .tag {
      font-size: 0.72rem;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 999px;
      background: var(--bg);
      border: 1px solid var(--line);
      color: var(--ink-soft);
    }

    .tag.accent {
      background: var(--accent-light);
      border-color: transparent;
      color: var(--accent-dark);
    }

    /* CTA */
    .cta-band {
      background: linear-gradient(135deg, #1f2a38 0%, #2a3a4d 100%);
      border-radius: 28px;
      padding: 48px 44px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 28px;
      flex-wrap: wrap;
      color: #dce4ec;
      margin-top: 12px;
    }

    .cta-band h3 {
      font-family: var(--font-display);
      font-size: clamp(1.4rem, 2.5vw, 1.85rem);
      font-weight: 700;
      color: #fff;
      margin-bottom: 8px;
    }

    .cta-band p {
      font-size: 0.92rem;
      max-width: 420px;
      line-height: 1.7;
    }

    .cta-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
    }

    .cta-band .btn-major {
      background: #fff;
      color: #1f2a38;
    }

    .cta-band .btn-major:hover {
      background: var(--accent-light);
      color: var(--accent-dark);
    }

    .cta-band .btn-major .arr {
      background: var(--accent);
      color: #fff;
    }

    .cta-band .btn-ghost {
      border-color: rgba(255,255,255,0.5);
      color: #fff;
    }

    .cta-band .btn-ghost:hover {
      background: #fff;
      color: #1f2a38;
    }

    /* Footer */
    .footer {
      background: var(--bg-card);
      border-top: 1px solid var(--line);
      padding: 72px 0 0;
      overflow: hidden;
    }

    .footer-grid {
      display: grid;
      grid-template-columns: 2fr 1fr 1fr 1.2fr;
      gap: 40px;
      margin-bottom: 56px;
    }

    .footer .logo { margin-bottom: 14px; }

    .footer-desc {
      font-size: 0.88rem;
      line-height: 1.7;
      max-width: 280px;
      color: var(--ink-soft);
    }

    .footer h4 {
      font-size: 0.82rem;
      font-weight: 600;
      letter-spacing: 0.14em;
      color: var(--ink-soft);
      margin-bottom: 18px;
    }

    .footer-links {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 11px;
    }

    .footer-links a {
      font-size: 0.9rem;
      color: var(--ink);
      transition: color 0.2s;
    }

    .footer-links a:hover { color: var(--accent-dark); }

    .footer-lang {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .footer-lang a {
      padding: 5px 12px;
      border-radius: 999px;
      font-size: 0.78rem;
      border: 1px solid var(--line);
      color: var(--ink-soft);
      cursor: pointer;
    }

    .footer-lang a.active {
      background: var(--ink);
      border-color: var(--ink);
      color: #fff;
    }

    .footer-bottom {
      border-top: 1px solid var(--line);
      padding: 22px 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
      font-size: 0.8rem;
      color: var(--ink-soft);
    }

    .footer-wordmark {
      font-family: var(--font-display);
      font-size: clamp(5rem, 16vw, 13rem);
      font-weight: 800;
      letter-spacing: -0.04em;
      line-height: 0.9;
      text-align: center;
      color: transparent;
      -webkit-text-stroke: 1.5px var(--line);
      user-select: none;
      margin-bottom: -0.18em;
      pointer-events: none;
    }

    @media (max-width: 960px) {
      .docs-layout {
        grid-template-columns: 1fr;
        gap: 24px;
      }

      .docs-toc {
        position: relative;
        top: 0;
        max-height: none;
        display: flex;
        flex-direction: column;
        background: var(--bg-card);
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: 16px 14px;
      }

      .docs-toc nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
      }

      .docs-toc a {
        border-left: none;
        padding: 8px 12px;
        background: var(--bg);
        font-size: 0.8rem;
      }

      .docs-toc a.active {
        border-left: none;
      }

      .grid-2 { grid-template-columns: 1fr; }

      .doc-card { padding: 28px 22px; }

      .footer-grid { grid-template-columns: 1fr 1fr; }

      .cta-band {
        flex-direction: column;
        text-align: center;
      }

      .cta-band p { margin: 0 auto; }
      .cta-actions { justify-content: center; }
    }

    @media (max-width: 560px) {
      .lang-chip-text,
      .lang-caret {
        display: none;
      }

      .lang-chip {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        background: var(--ink);
        border-color: var(--ink);
      }

      .lang-chip i {
        color: #fff;
      }

      .lang-dropdown {
        right: -8px;
      }
      .footer-grid { grid-template-columns: 1fr; }
      .param-table { display: block; overflow-x: auto; }
    }

    @media (prefers-reduced-motion: reduce) {
      .reveal { opacity: 1; transform: none; transition: none; }
    }
