:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --panel-soft: #f9fafb;
  --text: #111827;
  --muted: #5f6b7a;
  --muted-2: #8792a2;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --primary: #14b8a6;
  --primary-2: #0d9488;
  --primary-soft: #f0fdfa;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(at 40% 20%, rgba(20, 184, 166, 0.12) 0px, transparent 50%),
    radial-gradient(at 80% 0%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 50%, rgba(20, 184, 166, 0.08) 0px, transparent 50%),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-title,
.brand-subtitle {
  display: block;
}

.brand-title {
  font-size: 16px;
  font-weight: 750;
}

.brand-subtitle {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.endpoint-pill {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 12px;
  overflow-wrap: anywhere;
  padding: 9px 12px;
}

.page-shell {
  display: grid;
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
}

.sidebar {
  min-width: 0;
}

.sidebar-panel {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.sidebar-heading {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.sidebar-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.section-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.nav-button {
  display: grid;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  text-align: left;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.nav-button:hover {
  border-color: #99f6e4;
  background: var(--primary-soft);
}

.nav-button.active {
  border-color: #5eead4;
  background: var(--primary-soft);
  color: #0f766e;
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.14);
}

.nav-step {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.nav-button.active .nav-step {
  background: var(--primary);
  color: #fff;
}

.nav-label {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-desc {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.content-shell {
  min-width: 0;
}

.section-card {
  display: none;
}

.section-card.active {
  display: block;
}

.section-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.section-number {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.25);
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.2;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.notice-stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.notice {
  border: 1px solid;
  border-radius: var(--radius);
  padding: 14px 16px;
}

.notice-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 750;
}

.notice-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

.color-blue {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.color-primary {
  border-color: #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
}

.color-yellow {
  border-color: #fde68a;
  background: #fefce8;
  color: #a16207;
}

.color-amber {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.color-green {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.color-red {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.color-rose {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.color-indigo {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
}

.go-install-btn {
  display: inline-flex;
  margin-top: 10px;
  border: 0;
  border-radius: var(--radius);
  background: #4f46e5;
  color: #fff;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 700;
}

.tabs-card,
.steps-card,
.faq-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.tabs-list {
  display: flex;
  overflow: auto;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  flex: 1 1 0;
  min-width: 160px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 750;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.tab-button:hover,
.tab-button.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.tab-button.active {
  border-bottom-color: var(--primary);
}

.badge {
  display: inline-flex;
  margin-left: 6px;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  vertical-align: middle;
}

.tab-panel {
  display: none;
  padding: 22px;
}

.tab-panel.active {
  display: grid;
  gap: 18px;
}

.steps-card {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.substep {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(12px);
  padding: 20px;
}

.substep-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.substep-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.substep-title {
  margin: 0;
  font-size: 17px;
  font-weight: 760;
}

.blocks {
  display: grid;
  gap: 12px;
}

.blocks p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.blocks strong {
  color: var(--text);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.button-link,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.button-link {
  border: 1px solid var(--primary);
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
}

.button-link:hover {
  background: linear-gradient(90deg, var(--primary-2), #0f766e);
}

.button-secondary {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #4b5563;
}

.button-secondary:hover {
  background: #f9fafb;
}

.codebox {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101827;
}

.codebar {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f3f4f6;
  color: var(--muted);
  padding: 0 12px;
  font-size: 12px;
}

.copy-button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4b5563;
  padding: 5px 8px;
  font-size: 12px;
}

.copy-button:hover {
  background: #e5e7eb;
}

pre {
  margin: 0;
  overflow: auto;
  padding: 16px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

pre code {
  color: #e5e7eb;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
}

.guide-image-wrap {
  margin-top: 2px;
}

.guide-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.image-error {
  border: 1px dashed #f59e0b;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  padding: 12px 14px;
  font-size: 13px;
}

.bat-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafb;
  padding: 16px;
}

.bat-box label {
  display: block;
  margin-top: 12px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.bat-box input {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.bat-box input:focus {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.bat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.download-bat {
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 750;
}

.download-bat:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.small-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.footer-note {
  margin-top: 18px;
  border: 1px solid #99f6e4;
  border-radius: var(--radius);
  background: rgba(240, 253, 250, 0.74);
  color: #0f766e;
  padding: 18px;
  text-align: center;
}

.footer-note strong,
.footer-note span {
  display: block;
}

.footer-note strong {
  font-size: 15px;
}

.footer-note span {
  margin-top: 5px;
  font-size: 14px;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.faq-card {
  overflow: hidden;
}

.faq-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-card summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 20px;
  line-height: 1;
}

.faq-card[open] summary::after {
  content: "-";
}

.faq-answer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  padding: 14px 18px 18px;
  white-space: pre-line;
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-panel {
    position: static;
    max-height: none;
  }

  .section-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 18px 14px 40px;
  }

  .section-nav {
    grid-template-columns: 1fr;
  }

  .section-header {
    gap: 12px;
  }

  .section-number {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .tab-panel,
  .steps-card {
    padding: 14px;
  }

  .substep {
    padding: 15px;
  }
}
