* {
  box-sizing: border-box;
}
html {
  scrollbar-color: var(--muted) var(--surface-soft);
  scrollbar-width: thin;
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC',
    'PingFang TC', 'Microsoft JhengHei', sans-serif;
  font-size: 16px;
  line-height: 1.85;
}
a {
  color: var(--primary);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--primary-dark);
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  color: var(--muted);
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}
a,
button {
  touch-action: manipulation;
}
::selection {
  background: var(--border);
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: 8px;
  z-index: 5;
  padding: 8px 16px;
  background: var(--surface);
  border: 2px solid var(--primary);
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: none;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.header-inner {
  max-width: 1260px;
  margin: auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 3px;
}
.brand-mark i {
  width: 8px;
  height: 8px;
  background: var(--primary);
}
.brand-mark i:nth-child(2) {
  opacity: 0.55;
}
.brand-mark i:nth-child(3) {
  opacity: 0.8;
}
.docs-label {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-left: 1px solid var(--border);
  padding-left: 24px;
}
.console-link {
  margin-left: auto;
  white-space: nowrap;
  font-size: 14px;
  min-height: 44px;
  display: flex;
  align-items: center;
  text-decoration: none;
}
.docs-shell {
  max-width: 1260px;
  margin: auto;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 60px;
  padding: 32px 32px 64px;
}
aside {
  min-width: 0;
}
.nav-disclosure {
  position: sticky;
  top: 106px;
  max-height: calc(100dvh - 125px);
  overflow: auto;
  padding: 0 10px 0 0;
}
.nav-disclosure > summary {
  display: none;
}
.page-nav {
  display: grid;
  gap: 4px;
  margin-bottom: 28px;
}
.page-nav a {
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  min-height: 44px;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
}
.page-nav a:hover {
  background: var(--surface-soft);
}
.page-nav a[aria-current] {
  color: var(--primary);
  background: var(--bg);
  border-color: var(--primary);
  font-weight: 650;
}
.toc-title {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px 15px;
  font-weight: 650;
}
.toc {
  display: grid;
  gap: 2px;
  margin-bottom: 24px;
}
.toc a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px 6px 15px;
  line-height: 1.6;
}
.toc a:hover {
  color: var(--primary);
}
.download-link {
  display: block;
  font-size: 13px;
  padding: 6px 15px;
  min-height: 36px;
  text-decoration: none;
}
main {
  max-width: 850px;
  min-width: 0;
  padding: 0 0 16px;
}
h1 {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.35;
  letter-spacing: -0.6px;
  margin: 12px 0 20px;
}
h2 {
  font-size: 23px;
  line-height: 1.55;
  letter-spacing: -0.25px;
  margin: 0 0 18px;
}
h3 {
  font-size: 18px;
  margin: 28px 0 14px;
}
.eyebrow {
  color: var(--primary);
  font-size: 11px;
  letter-spacing: 1.25px;
  font-weight: 700;
  margin-top: 26px;
}
.intro {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 40px;
}
.intro p {
  margin: 0 0 16px;
}
.article-content section {
  scroll-margin-top: 98px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-top: 36px;
}
.heading-link {
  color: var(--text);
  text-decoration: none;
}
.heading-link:hover {
  color: var(--primary);
}
p {
  margin: 0 0 20px;
  overflow-wrap: anywhere;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 2px 5px;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
.code-block {
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-soft);
}
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 4px 20px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.copy-code {
  font-size: 12px;
  border: 1px solid transparent;
  background: transparent;
  min-height: 36px;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--primary);
  white-space: nowrap;
}
.copy-code:hover {
  border-color: var(--border);
  background: var(--surface);
}
pre {
  margin: 0;
  padding: 20px;
  overflow: auto;
  line-height: 1.65;
  scrollbar-gutter: stable;
  max-height: 680px;
}
pre code {
  border: 0;
  background: none;
  padding: 0;
  white-space: pre;
  overflow-wrap: normal;
  font-size: 13px;
  line-height: 1.65;
}
.table-scroll {
  overflow: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  scrollbar-gutter: stable;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.75;
}
th,
td {
  padding: 12px 16px;
  vertical-align: top;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  font-weight: 650;
  background: var(--surface-soft);
  white-space: nowrap;
}
tbody tr:last-child td {
  border: 0;
}
td {
  min-width: 125px;
  overflow-wrap: anywhere;
}
td:first-child {
  min-width: 170px;
}
.search {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 30px;
}
.search label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.search-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
  padding: 0 6px 0 14px;
}
.search-control:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.search input {
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  width: 100%;
  height: 46px;
  min-width: 0;
  font-size: 14px;
}
.search input:focus-visible {
  outline: 0;
}
.search input::-webkit-search-cancel-button {
  appearance: none;
}
#clear-search {
  flex-shrink: 0;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  padding: 6px 12px;
  min-height: 44px;
}
#clear-search:disabled {
  color: var(--muted);
}
#search-status {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  min-height: 18px;
  margin: 7px 0 0;
}
#search-results {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  max-height: 360px;
  overflow: auto;
}
#search-results li + li {
  border-top: 1px solid var(--border);
}
#search-results a {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
#search-results a:hover {
  background: var(--surface-soft);
}
#search-results span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.faq {
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 100px;
}
.faq:first-child {
  border-top: 1px solid var(--border);
}
.faq summary {
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  padding: 20px 4px;
  line-height: 1.6;
}
.faq summary::marker {
  color: var(--primary);
}
.faq[open] summary {
  color: var(--primary);
}
.faq-body {
  padding: 0 24px 6px;
}
.article-footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.copy-status {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: calc(100% - 40px);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 4px 20px #0f172a15;
  border-radius: 5px;
}
.copy-status:not(:empty) {
  border: 1px solid var(--border);
  padding: 10px 16px;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--surface-soft);
}
::-webkit-scrollbar-thumb {
  background: var(--muted);
  border: 3px solid var(--surface-soft);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text);
}
@media (max-width: 1000px) {
  .docs-shell {
    gap: 32px;
    grid-template-columns: 208px minmax(0, 1fr);
    padding-inline: 24px;
  }
  .header-inner {
    padding-inline: 24px;
  }
  .toc a {
    font-size: 12px;
  }
}
@media (max-width: 740px) {
  html {
    scroll-padding-top: 80px;
  }
  .header-inner {
    min-height: 64px;
    padding-inline: 20px;
    gap: 12px;
  }
  .brand {
    font-size: 16px;
  }
  .docs-label {
    font-size: 12px;
    padding-left: 12px;
  }
  .console-link {
    font-size: 12px;
  }
  .docs-shell {
    display: block;
    padding: 16px 20px 48px;
  }
  .nav-disclosure {
    position: static;
    max-height: none;
    padding: 0;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: 5px;
  }
  .nav-disclosure > summary {
    display: list-item;
    font-size: 14px;
    cursor: pointer;
    padding: 10px 16px;
    min-height: 44px;
  }
  .page-nav {
    margin: 0 12px 20px;
  }
  .toc {
    margin: 0 12px 20px;
  }
  .toc-title {
    margin-left: 27px;
  }
  .toc a {
    min-height: 36px;
    font-size: 13px;
  }
  .download-link {
    padding-left: 27px;
    min-height: 44px;
  }
  .nav-disclosure .download-link:last-child {
    margin-bottom: 12px;
  }
  .eyebrow {
    margin-top: 22px;
  }
  h1 {
    font-size: 29px;
  }
  h2 {
    font-size: 21px;
  }
  .intro {
    font-size: 16px;
    margin-bottom: 32px;
  }
  .article-content section {
    margin-top: 28px;
    padding-top: 24px;
  }
  pre {
    padding: 16px;
  }
  pre code {
    font-size: 12px;
  }
  .code-toolbar {
    padding-left: 16px;
  }
  .copy-code {
    min-height: 44px;
  }
  .faq-body {
    padding-left: 18px;
    padding-right: 10px;
  }
  .faq summary {
    font-size: 16px;
  }
  .article-footer {
    display: grid;
    font-size: 11px;
  }
}
@media (max-width: 390px) {
  .header-inner {
    padding-inline: 14px;
  }
  .docs-label {
    border: 0;
    padding: 0;
  }
  .console-link {
    display: none;
  }
  .docs-shell {
    padding-inline: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
@media (forced-colors: active) {
  html {
    scrollbar-color: auto;
  }
  .brand-mark i {
    background: CanvasText;
  }
  :focus-visible {
    outline-color: Highlight;
  }
  .page-nav a[aria-current] {
    border-color: Highlight;
  }
  .search-control {
    border-color: CanvasText;
  }
}
@media print {
  .site-header,
  aside,
  .search,
  .copy-code,
  .skip-link,
  .copy-status {
    display: none !important;
  }
  .docs-shell {
    display: block;
    padding: 0;
  }
  main {
    max-width: none;
  }
  .article-content section {
    break-inside: avoid;
  }
  pre {
    white-space: pre-wrap;
    max-height: none;
  }
  pre code {
    white-space: pre-wrap;
  }
  .table-scroll {
    overflow: visible;
  }
  .faq-body {
    display: block;
  }
  .faq {
    display: block;
  }
  .faq > summary {
    list-style: none;
  }
  a {
    color: inherit;
  }
  .article-footer {
    font-size: 10px;
  }
}

.mobile-console {
  display: none;
}
@media (max-width: 390px) {
  .mobile-console {
    display: block;
  }
}
