:root {
  color-scheme: light;
  --brand-orange: #e75b29;
  --brand-orange-dark: #ca4317;
  --brand-orange-soft: #fff1e9;
  --ink: #202124;
  --muted: #687078;
  --line: #e7e8e9;
  --paper: #fff;
  --canvas: #f7f8f8;
  --code: #202329;
  --code-muted: #9ca6b4;
  --shadow: 0 6px 22px rgb(28 34 40 / 7%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 15px; line-height: 1.65; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
body[data-lang="en"] .lang-zh { display: none !important; }
body[data-lang="zh"] .lang-en { display: none !important; }
.language-neutral { display: inline; }

.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 9px 14px; color: #fff; background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.topbar { position: sticky; z-index: 40; top: 0; display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 30px; background: rgb(255 255 255 / 96%); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: inline-flex; min-width: 270px; align-items: center; gap: 15px; text-decoration: none; }
.brand img { display: block; width: 140px; height: 42px; object-fit: contain; }
.brand-divider { width: 1px; height: 34px; background: var(--line); }
.brand-title { color: #17191b; font-size: 15px; letter-spacing: -.35px; white-space: nowrap; }
.brand-title strong { font-weight: 750; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.search-box { display: flex; width: min(380px, 35vw); height: 40px; align-items: center; gap: 9px; padding: 0 10px 0 13px; background: #f5f6f6; border: 1px solid #eef0f0; border-radius: 9px; transition: border-color .18s, box-shadow .18s; }
.search-box:focus-within { background: #fff; border-color: #e7a184; box-shadow: 0 0 0 3px rgb(231 91 41 / 10%); }
.search-icon { color: #6e7478; font-size: 25px; line-height: 1; transform: rotate(-20deg); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-box input::placeholder { color: #858b90; }
kbd { min-width: 20px; padding: 1px 5px; color: #7b8186; background: #fff; border: 1px solid #dedfe0; border-radius: 4px; font: 11px ui-monospace, monospace; text-align: center; }
.clear-search { width: 22px; height: 24px; border: 0; color: #747a7e; background: transparent; cursor: pointer; font-size: 20px; }
.language-switch { display: flex; padding: 3px; background: #f3f3f2; border-radius: 8px; }
.language-switch button { min-width: 42px; padding: 5px 9px; color: #5b6166; background: transparent; border: 0; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 700; }
.language-switch button[aria-pressed="true"] { color: #fff; background: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / 14%); }
.mobile-menu-button { display: none; }

.portal-grid { display: grid; grid-template-columns: 264px minmax(0, 1fr) 226px; column-gap: 32px; max-width: 1680px; min-height: calc(100vh - 72px); margin: 0 auto; padding: 26px 32px 70px; }
.left-sidebar { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 112px); overflow-y: auto; padding: 16px 12px 12px 2px; scrollbar-width: thin; }
.sidebar-heading { display: grid; gap: 7px; padding: 0 12px 20px; border-bottom: 1px solid var(--line); }
.eyebrow { color: #858b90; font-size: 10px; font-weight: 800; letter-spacing: 1.1px; }
.eyebrow.accent { color: var(--brand-orange-dark); }
.sidebar-title { color: #25282a; font-size: 17px; font-weight: 750; letter-spacing: -.2px; }
.nav-group { padding: 20px 0 3px; }
.nav-group h3 { margin: 0 12px 7px; color: #8a8f93; font-size: 10px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; }
.nav-link { position: relative; display: block; margin: 2px 0; padding: 6px 12px; overflow: hidden; color: #555d62; border-radius: 7px; font-size: 12px; line-height: 1.45; text-decoration: none; text-overflow: ellipsis; transition: color .16s, background .16s; }
.nav-link:hover, .nav-link:focus-visible { color: var(--brand-orange-dark); background: var(--brand-orange-soft); outline: 0; }
.nav-link.active { color: var(--brand-orange-dark); background: var(--brand-orange-soft); font-weight: 700; }
.nav-link.nested { padding-left: 22px; color: #747a7f; font-size: 11px; }
.nav-link.nested::before { position: absolute; top: 13px; left: 12px; width: 4px; height: 4px; background: #c5c9cb; border-radius: 50%; content: ""; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin: 20px 10px 0; padding: 13px 3px 0; color: #82888c; border-top: 1px solid var(--line); font-size: 11px; }
.status-dot { width: 7px; height: 7px; background: #46a875; border-radius: 100%; box-shadow: 0 0 0 3px #e3f4eb; }

.content-column { min-width: 0; }
.hero-card { position: relative; display: flex; min-height: 235px; align-items: center; justify-content: space-between; margin: 0 0 35px; padding: 36px 42px; overflow: hidden; background: linear-gradient(115deg, #fff 0%, #fff 65%, #fff8f3 100%); border: 1px solid #f0efed; border-radius: 18px; box-shadow: var(--shadow); }
.hero-copy { position: relative; z-index: 1; max-width: 640px; }
.hero-title { margin: 10px 0 4px; color: #202124; font-size: clamp(29px, 3.3vw, 43px); font-weight: 760; letter-spacing: -1.7px; line-height: 1.13; }
.hero-copy p { margin: 12px 0 18px; color: #62696d; font-size: 15px; }
.hero-meta { display: flex; align-items: center; gap: 10px; color: #747b7f; font-size: 12px; }
.version-pill { padding: 3px 9px; color: #fff; background: var(--brand-orange); border-radius: 999px; font-weight: 800; }
.meta-separator { color: #c2c5c7; }
.hero-mark { position: absolute; top: 0; right: 0; width: 260px; height: 100%; opacity: .94; }
.hero-orbit { position: absolute; right: -76px; width: 282px; height: 282px; border: 1px solid rgb(231 91 41 / 14%); border-radius: 50%; }
.orbit-one { top: -31px; }
.orbit-two { top: -5px; right: -50px; width: 226px; height: 226px; border-color: rgb(231 91 41 / 10%); }
.hero-package { position: absolute; top: 73px; right: 85px; width: 74px; height: 68px; transform: rotate(-9deg); }
.hero-package::before { position: absolute; top: 0; left: 0; width: 74px; height: 37px; background: #f3a47f; clip-path: polygon(50% 0, 100% 22%, 50% 45%, 0 22%); content: ""; }
.hero-package::after { position: absolute; top: 16px; left: 0; width: 74px; height: 49px; background: var(--brand-orange); clip-path: polygon(0 0, 50% 24%, 50% 100%, 0 67%); content: ""; }
.hero-package span:first-child { position: absolute; z-index: 1; top: 16px; right: 0; width: 37px; height: 49px; background: #f08052; clip-path: polygon(0 24%, 100% 0, 100% 67%, 0 100%); }
.hero-package span:nth-child(2) { position: absolute; z-index: 2; top: 16px; left: 36px; width: 2px; height: 49px; background: rgb(255 255 255 / 42%); }
.hero-package span:nth-child(3) { display: none; }

.search-status { margin: -16px 0 25px; padding: 10px 14px; color: #6f4a39; background: #fff4ed; border: 1px solid #f6dacb; border-radius: 8px; font-size: 13px; }
.spec-content { padding: 0 0 30px; }
.spec-title { margin: 0 0 16px; color: #212427; font-size: 28px; line-height: 1.25; letter-spacing: -.8px; }
.doc-section { margin: 34px 0 42px; scroll-margin-top: 92px; }
.doc-section > h2 { position: relative; margin: 0 0 19px; padding: 0 0 12px 15px; color: #25282a; border-bottom: 1px solid var(--line); font-size: 24px; line-height: 1.35; letter-spacing: -.5px; }
.doc-section > h2::before { position: absolute; top: 2px; bottom: 15px; left: 0; width: 4px; background: var(--brand-orange); border-radius: 4px; content: ""; }
.doc-subsection { margin: 27px 0 33px; scroll-margin-top: 94px; }
.doc-subsection > h3 { margin: 0 0 14px; color: #2d3032; font-size: 19px; line-height: 1.4; letter-spacing: -.25px; }
.nested-heading { margin: 22px 0 10px; color: #303437; font-size: 16px; }
.spec-content p { margin: 10px 0 15px; color: #41474b; }
.spec-content strong { color: #232628; }
.spec-content code:not(pre code) { padding: 2px 5px; color: #a84624; background: #fff1e9; border: 1px solid #f7e2d8; border-radius: 4px; font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.spec-content ul, .spec-content ol { margin: 10px 0 18px; padding-left: 23px; color: #41474b; }
.spec-content li { padding: 3px 0 3px 2px; }
.spec-content li::marker { color: var(--brand-orange); }
.spec-content blockquote { margin: 18px 0; padding: 11px 17px; color: #754a36; background: #fff4ed; border-left: 3px solid var(--brand-orange); border-radius: 0 8px 8px 0; }
.table-wrap { width: 100%; margin: 18px 0 24px; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 2px 7px rgb(28 34 40 / 3%); }
table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.55; }
th, td { min-width: 110px; padding: 10px 13px; border-bottom: 1px solid #eceeee; text-align: left; vertical-align: top; }
th { color: #535a5e; background: #f7f8f7; font-size: 11px; font-weight: 800; letter-spacing: .1px; }
td:first-child { color: #272b2e; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 650; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fffaf7; }
.code-shell { position: relative; margin: 17px 0 22px; overflow: hidden; background: var(--code); border: 1px solid #32373d; border-radius: 10px; box-shadow: 0 5px 15px rgb(26 30 35 / 10%); }
.code-toolbar { display: flex; height: 37px; align-items: center; justify-content: space-between; padding: 0 12px 0 15px; color: var(--code-muted); background: #292d33; border-bottom: 1px solid #3a3f45; font-size: 10px; font-weight: 800; letter-spacing: .8px; }
.copy-button { padding: 4px 9px; color: #e4e7eb; background: #363b42; border: 1px solid #484e56; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 650; letter-spacing: 0; }
.copy-button:hover, .copy-button:focus-visible { color: #fff; background: var(--brand-orange-dark); border-color: var(--brand-orange-dark); outline: 0; }
pre { margin: 0; padding: 18px 20px 20px; overflow-x: auto; color: #ecf0f4; font: 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; }
pre code { font: inherit; white-space: pre; }
.token-key { color: #91c4ff; }
.token-string { color: #b9e2aa; }
.token-number { color: #f1bd7f; }
.token-literal { color: #d5a4ff; }
.token-punctuation { color: #aab3bd; }
.right-sidebar { min-width: 0; }
.right-sticky { position: sticky; top: 102px; max-height: calc(100vh - 125px); overflow-y: auto; padding: 12px 0 20px; scrollbar-width: thin; }
.right-sticky > .eyebrow { display: block; padding: 0 0 11px 11px; }
.right-nav { padding-left: 8px; border-left: 1px solid var(--line); }
.right-nav .nav-link { margin: 0; padding: 5px 8px; font-size: 11px; }
.right-nav .nav-link.nested { margin-left: 5px; padding-left: 15px; font-size: 10px; }
.right-nav .nav-link.nested::before { left: 6px; }
.page-footer { display: flex; align-items: center; gap: 18px; padding: 21px 0 5px; color: #7c8286; border-top: 1px solid var(--line); font-size: 11px; }
.page-footer img { width: 112px; height: 34px; object-fit: contain; }
.page-footer a { margin-left: auto; color: #6b7175; text-decoration: none; }
.page-footer a:hover { color: var(--brand-orange-dark); }
.toast { position: fixed; z-index: 90; right: 22px; bottom: 20px; padding: 11px 16px; color: #fff; background: #25292c; border-radius: 8px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.mobile-backdrop { display: none; }

@media (max-width: 1240px) {
  .portal-grid { grid-template-columns: 240px minmax(0, 1fr); column-gap: 26px; padding-right: 28px; padding-left: 24px; }
  .right-sidebar { display: none; }
  .hero-mark { opacity: .55; }
}

@media (min-width: 761px) and (max-width: 1024px) {
  .topbar { padding: 0 18px; }
  .mobile-menu-button { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; flex: 0 0 auto; color: #34383a; background: #f5f5f4; border: 0; border-radius: 8px; cursor: pointer; font-size: 19px; }
  .brand { min-width: 230px; gap: 9px; }
  .brand img { width: 120px; height: 36px; }
  .brand-divider { height: 30px; }
  .brand-title { font-size: 13px; }
  .portal-grid { display: block; padding: 21px 24px 48px; }
  .left-sidebar { position: fixed; z-index: 55; top: 72px; bottom: 0; left: 0; width: min(300px, 78vw); max-height: none; padding: 18px 14px 24px; background: #fff; box-shadow: 10px 0 28px rgb(20 24 26 / 12%); transform: translateX(-110%); transition: transform .22s ease; }
  body.menu-open .left-sidebar { transform: translateX(0); }
  .mobile-backdrop { position: fixed; z-index: 50; inset: 72px 0 0; background: rgb(20 24 26 / 35%); }
  body.menu-open .mobile-backdrop { display: block; }
  .hero-mark { right: -10px; opacity: .28; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }
  .topbar { height: 62px; gap: 10px; padding: 0 13px; }
  .mobile-menu-button { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; flex: 0 0 auto; color: #34383a; background: #f5f5f4; border: 0; border-radius: 8px; cursor: pointer; font-size: 19px; }
  .brand { min-width: 0; gap: 8px; }
  .brand img { width: 100px; height: 31px; }
  .brand-divider { display: none; }
  .brand-title { display: none; }
  .top-actions { gap: 8px; }
  .search-box { width: 39px; height: 38px; justify-content: center; padding: 0; background: transparent; border-color: transparent; }
  .search-box:focus-within { position: absolute; right: 91px; left: 56px; width: auto; padding: 0 9px; background: #fff; border-color: #e7a184; }
  .search-box input { display: none; }
  .search-box:focus-within input { display: block; }
  .search-box kbd, .search-box .clear-search { display: none; }
  .language-switch button { min-width: 35px; padding: 5px 6px; font-size: 11px; }
  .portal-grid { display: block; min-height: calc(100vh - 62px); padding: 16px 15px 38px; }
  .left-sidebar { position: fixed; z-index: 55; top: 62px; bottom: 0; left: 0; width: min(300px, 84vw); max-height: none; padding: 18px 14px 24px; background: #fff; box-shadow: 10px 0 28px rgb(20 24 26 / 12%); transform: translateX(-110%); transition: transform .22s ease; }
  body.menu-open .left-sidebar { transform: translateX(0); }
  .mobile-backdrop { position: fixed; z-index: 50; inset: 62px 0 0; background: rgb(20 24 26 / 35%); }
  body.menu-open .mobile-backdrop { display: block; }
  .hero-card { min-height: 208px; margin-bottom: 28px; padding: 25px 22px; border-radius: 14px; }
  .hero-title { max-width: 460px; font-size: 31px; letter-spacing: -1.1px; }
  .hero-copy p { max-width: 330px; font-size: 13px; }
  .hero-mark { right: -75px; width: 190px; opacity: .2; }
  .spec-title { font-size: 24px; }
  .doc-section { margin: 28px 0 36px; }
  .doc-section > h2 { font-size: 21px; }
  .doc-subsection > h3 { font-size: 17px; }
  .spec-content p { font-size: 14px; }
  .table-wrap { margin: 14px 0 19px; }
  th, td { min-width: 125px; padding: 9px 10px; }
  pre { padding: 14px; font-size: 11.5px; }
  .page-footer { flex-wrap: wrap; gap: 10px 14px; }
  .page-footer span { flex: 1 1 170px; }
  .page-footer a { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
