:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f1f6f4;
  --surface-warm: #fff7ed;
  --text: #172033;
  --muted: #647084;
  --line: #dfe5ec;
  --line-strong: #c8d2dd;
  --brand: #087f72;
  --brand-dark: #065f56;
  --brand-soft: #e6f5f1;
  --blue: #2563a9;
  --amber: #9a5b00;
  --red: #b42318;
  --code-bg: #111827;
  --code-text: #f8fafc;
  --shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.72;
}

a {
  color: var(--brand-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(8, 127, 114, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 50;
  transform: translateY(-140%);
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px 12px;
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 229, 236, 0.88);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  max-width: 1440px;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
}

.top-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.top-nav a {
  border-radius: 8px;
  padding: 7px 8px;
  color: #475467;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.docs-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 28px 64px;
}

.sidebar,
.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 112px);
  overflow: auto;
}

.sidebar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.sidebar-search {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sidebar-search label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  padding: 8px 10px;
}

.sidebar-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(8, 127, 114, 0.12);
}

.sidebar-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.sidebar-group + .sidebar-group {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.sidebar-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.sidebar a,
.toc a {
  display: block;
  border-radius: 8px;
  padding: 7px 9px;
  color: #344054;
  font-size: 14px;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a[aria-current="page"],
.toc a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.toc {
  color: var(--muted);
  font-size: 13px;
}

.toc strong {
  display: block;
  margin-bottom: 8px;
  color: #344054;
}

.toc a {
  padding: 5px 0 5px 10px;
}

.toc a[aria-current="location"] {
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 800;
  padding-left: 9px;
}

.content {
  min-width: 0;
  max-width: 100%;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.doc-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(230, 245, 241, 0.9), rgba(255, 247, 237, 0.7)),
    var(--surface);
  padding: 32px;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
}

.eyebrow::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.28;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  font-size: 42px;
  overflow-wrap: anywhere;
}

h2 {
  margin-top: 44px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 28px;
}

h3 {
  margin-top: 28px;
  font-size: 21px;
}

h4 {
  margin-top: 20px;
  font-size: 17px;
}

p {
  margin: 12px 0 0;
}

.lead {
  max-width: 820px;
  color: #475467;
  font-size: 18px;
}

.read-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #536471;
  font-size: 14px;
  font-weight: 700;
}

.read-meta span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  overflow-wrap: anywhere;
}

.read-meta span + span::before {
  width: 4px;
  height: 4px;
  margin-right: 8px;
  border-radius: 999px;
  background: #98a2b3;
  content: "";
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #ffffff;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.badge {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  max-width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
}

.button.secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.card h3 {
  margin-top: 0;
  font-size: 18px;
}

.card p {
  color: #526070;
}

.step-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.step-num {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 900;
}

.callout {
  margin-top: 18px;
  border: 1px solid #b7ded5;
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px 16px;
}

.callout.warning {
  border-color: #fed7aa;
  border-left-color: var(--amber);
  background: var(--surface-warm);
}

.callout.danger {
  border-color: #fecaca;
  border-left-color: var(--red);
  background: #fff5f5;
}

code {
  border-radius: 6px;
  background: #edf1f5;
  padding: 2px 6px;
  color: #344054;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.92em;
}

pre {
  position: relative;
  overflow-x: auto;
  margin: 14px 0 0;
  border-radius: 8px;
  background: var(--code-bg);
  padding: 18px;
  color: var(--code-text);
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.copy-code {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.copy-code:hover {
  background: rgba(255, 255, 255, 0.16);
}

table {
  display: block;
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table > thead,
table > tbody {
  display: table;
  width: 100%;
  min-width: 640px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

th code,
td code {
  overflow-wrap: normal;
  white-space: nowrap;
}

th {
  background: #f4f7f9;
  color: #344054;
  font-size: 14px;
}

tr:last-child td {
  border-bottom: 0;
}

ul,
ol {
  margin: 10px 0 0;
  padding-left: 22px;
}

li + li {
  margin-top: 6px;
}

details {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px 16px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.screenshot {
  overflow-x: auto;
  margin: 18px 0 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshot.wide img {
  min-width: 780px;
}

.screenshot figcaption {
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  color: var(--muted);
  font-size: 14px;
}

.config-panel {
  margin: 18px 0 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.config-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f6f8fb;
}

.config-panel-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
}

.config-panel-subtitle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.config-screen {
  display: grid;
  gap: 0;
}

.config-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) minmax(170px, 230px);
  gap: 12px;
  align-items: start;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.config-row:last-child {
  border-bottom: 0;
}

.config-key {
  color: #344054;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.config-value {
  min-width: 0;
  color: var(--text);
  font-weight: 760;
}

.config-value code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.config-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.config-panel-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.next-prev {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 44px;
}

.next-prev a {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.next-prev a:last-child {
  text-align: right;
}

.site-footer {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px 36px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 1180px) {
  .docs-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .toc {
    display: none;
  }

  .config-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}

@media (max-width: 860px) {
  html,
  body {
    overflow-x: hidden;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 16px;
  }

  .top-nav {
    padding-bottom: 2px;
  }

  .docs-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    padding: 18px 16px 48px;
  }

  .content {
    width: 100%;
    order: 1;
  }

  .sidebar {
    position: static;
    order: 2;
    max-height: none;
  }

  .doc-hero {
    width: 100%;
    max-width: 100%;
    padding: 24px;
    overflow-wrap: anywhere;
  }

  .hero-actions .button,
  .actions .button {
    flex: 1 1 100%;
  }

  h1 {
    font-size: 28px;
    word-break: break-all;
    line-break: anywhere;
  }

  .lead,
  .read-meta {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  h2 {
    font-size: 24px;
  }

  .grid,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .next-prev {
    flex-direction: column;
  }

  .next-prev a:last-child {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .doc-hero {
    padding: 20px;
  }

  .step {
    grid-template-columns: 1fr;
  }

  .meta-row {
    gap: 8px;
  }

  table > thead,
  table > tbody {
    min-width: 580px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #111827;
    --muted: #4b5563;
    --line: #d1d5db;
    --code-bg: #f3f4f6;
    --code-text: #111827;
  }

  html {
    scroll-behavior: auto;
  }

  body {
    background: #ffffff;
    color: #111827;
    font-size: 12pt;
    line-height: 1.55;
  }

  .site-header,
  .sidebar,
  .toc,
  .hero-actions,
  .actions,
  .copy-code,
  .next-prev,
  .site-footer,
  .skip-link {
    display: none !important;
  }

  .docs-shell {
    display: block;
    max-width: none;
    padding: 0;
  }

  .content,
  .doc-hero,
  .card,
  .step,
  .callout,
  details,
  table {
    box-shadow: none;
  }

  .doc-hero,
  .card,
  .step,
  .callout,
  details {
    break-inside: avoid;
  }

  h1 {
    font-size: 24pt;
  }

  h2 {
    break-after: avoid;
    font-size: 17pt;
  }

  h3 {
    break-after: avoid;
    font-size: 14pt;
  }

  a {
    color: #111827;
    text-decoration: underline;
  }

  pre,
  table {
    break-inside: avoid;
  }

  pre {
    white-space: pre-wrap;
    border: 1px solid #d1d5db;
  }

  table {
    display: table;
    overflow: visible;
  }

  table > thead,
  table > tbody {
    display: table-row-group;
    min-width: 0;
  }
}
