:root {
  color-scheme: light;
  --brand-1: #3b82f6;
  --brand-2: #8b5cf6;
  --brand-3: #06b6d4;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f5f8fc;
  --card: #ffffff;
  --ok: #0f9f6e;
  --warn: #b45309;
  --radius: 16px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
    "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-1); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
}
.skip-link:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 11px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  background: linear-gradient(135deg, #5bc0fa 0%, #4f8cff 45%, #8b5cf6 100%);
  box-shadow: 0 6px 16px rgba(79, 140, 255, 0.28);
}
.brand-text strong { display: block; font-size: 15px; line-height: 1.3; }
.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  line-height: 1.4;
}
.header-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.header-nav a[aria-current="page"] {
  color: var(--brand-1);
  font-weight: 600;
}
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-nav + .header-actions { margin-left: 0; }
.print-btn {
  font: inherit;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.print-btn:hover { border-color: #c7d2fe; color: var(--brand-1); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 340px at 12% 0%, rgba(91, 192, 250, 0.20), transparent 62%),
    radial-gradient(760px 320px at 92% 8%, rgba(139, 92, 246, 0.18), transparent 64%),
    linear-gradient(135deg, #eef7ff 0%, #f6f2ff 52%, #edfdfb 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 46px 20px 34px;
}
.eyebrow {
  margin: 0;
  color: var(--brand-1);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
h1 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.meta { margin: 4px 0; color: var(--muted); font-size: 12.5px; }
.lead {
  margin-top: 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}
.lead p { margin: 6px 0; }
.hero .print-btn { margin-top: 14px; }

/* ---------- Layout ---------- */
.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 20px 64px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 92px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.toc h2 {
  margin: 2px 6px 8px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 2px 0; }
.toc a {
  display: block;
  padding: 5px 7px;
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 12.8px;
  line-height: 1.5;
}
.toc a:hover { background: #eff6ff; color: var(--brand-1); text-decoration: none; }

.article { min-width: 0; width: 100%; }
.card {
  width: 100%;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px 28px;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.045);
}
.article h2 {
  margin: 32px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.article h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.article h3 { margin: 20px 0 6px; font-size: 15.5px; }
.article p { margin: 9px 0; }
.article ul, .article ol { margin: 8px 0; padding-left: 22px; }
.article li { margin: 5px 0; }
.article strong { color: #0f172a; }
.article code {
  background: #f1f5f9;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 13px;
}
.sdk-pkg { color: var(--muted); font-size: 12px; }

.callout {
  border: 1px solid;
  border-radius: 12px;
  padding: 13px 15px;
  margin: 15px 0;
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }
.callout.info { background: #f0f7ff; border-color: #cfe3ff; }
.callout.warn { background: #fff8eb; border-color: #fde3b3; }
.callout.ok { background: #f0fdf7; border-color: #bbf7d0; }
.callout ul { margin: 6px 0 0; }

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; min-width: 580px; border-collapse: collapse; font-size: 13.2px; }
th, td {
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
th { background: #f8fafc; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.contact-item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.2px;
  line-height: 1.65;
}
.contact-item b {
  display: block;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}
.notice {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px dashed #cbd5e1;
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0b1220;
  color: #cbd5e1;
  padding: 26px 20px;
  font-size: 12.5px;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.site-footer a { color: #93c5fd; }
.site-footer .sep { color: #475569; margin: 0 6px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 18px; padding-top: 20px; }
  .toc { position: static; }
  .toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 8px; }
  .header-nav { display: none; }
  .hero-inner { padding-top: 34px; }
}

@media (max-width: 560px) {
  .contact-grid { grid-template-columns: 1fr; }
  .card { padding: 18px 16px 22px; }
  .article h2 { font-size: 18px; }
  .toc ol { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
}

@media print {
  body { background: #fff; }
  .site-header, .toc, .site-footer, .print-btn { display: none !important; }
  .hero { background: #fff; border-bottom: 0; }
  .hero-inner { padding: 0 0 14px; }
  .layout { display: block; padding: 0; }
  .card { border: 0; box-shadow: none; padding: 0; }
  .article h2 { break-after: avoid; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; }
}
