:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f9fbfd;
  --text: #172033;
  --muted: #667085;
  --line: #d9e2ec;
  --accent: #0f9f8f;
  --accent-strong: #0b766e;
  --blue: #2563eb;
  --amber: #b45309;
  --danger: #b42318;
  --code-bg: #101828;
  --code-text: #e6edf6;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #eef8f6 0, rgba(238, 248, 246, 0) 260px),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 24px 18px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.brand-title {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: 0;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border-radius: 8px;
  color: #334155;
  padding: 8px 10px;
  font-size: 14px;
  text-decoration: none;
}

.nav a:hover {
  background: #eef6f5;
  color: var(--accent-strong);
}

.nav a.active {
  background: #e5faf6;
  color: #087668;
  font-weight: 700;
}

.nav-group {
  border-radius: 8px;
}

.nav-group summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
  font-size: 14px;
  list-style: none;
  padding: 8px 10px;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  margin-left: auto;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.nav-group[open] summary::after {
  transform: rotate(225deg);
}

.nav-group summary:hover {
  background: #eef6f5;
  color: var(--accent-strong);
}

.nav-group.active summary {
  color: #087668;
  font-weight: 700;
}

.nav-children {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid var(--line);
  margin: 2px 0 4px 10px;
  padding-left: 8px;
}

.nav-children a {
  min-height: 36px;
  padding-left: 10px;
}

.main {
  min-width: 0;
  padding: 34px 26px 48px;
}

.content {
  width: min(980px, 100%);
  margin: 0 auto;
}

.hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
}

h2 {
  margin: 34px 0 12px;
  font-size: 24px;
}

h3 {
  margin: 22px 0 8px;
  font-size: 18px;
}

p {
  margin: 10px 0;
}

.lead {
  max-width: 760px;
  color: #475467;
  font-size: 17px;
}

.overview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  padding: 22px;
}

.overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.overview-head h2 {
  margin: 0 0 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 750;
  padding: 5px 10px;
  white-space: nowrap;
}

.status-pill[data-state="ready"] {
  border-color: #99f6e4;
  background: #ecfdf5;
  color: #087668;
}

.status-pill[data-state="error"] {
  border-color: #fecaca;
  background: #fff1f2;
  color: var(--danger);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 18px;
}

.stat-card.primary {
  border-color: #99f6e4;
  background: #ecfdf5;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.stat-card strong {
  display: block;
  margin: 8px 0;
  color: #0f172a;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 820;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.stat-card p {
  color: var(--muted);
  margin: 0;
}

.overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  margin-top: 16px;
  padding-top: 12px;
}

.overview-meta strong {
  color: #344054;
  font-weight: 750;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card,
.callout,
.steps,
.pager {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card {
  padding: 18px;
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--muted);
}

.card .go {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  font-weight: 700;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 14px;
  margin: 16px 0;
}

.contact-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.contact-card h3 {
  margin-top: 0;
}

.contact-card p {
  color: var(--muted);
}

.qr-contact {
  display: flex;
  flex-direction: column;
}

.qr-image {
  display: block;
  width: min(100%, 260px);
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  margin: 8px auto 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 750;
  font: inherit;
  padding: 9px 14px;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-strong);
  text-decoration: none;
}

.button.secondary {
  background: #ffffff;
  color: var(--accent-strong);
}

.button.secondary:hover {
  background: #eef6f5;
}

.image-dialog {
  width: min(1180px, calc(100vw - 28px));
  max-height: min(92vh, 980px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  padding: 0;
}

.image-dialog::backdrop {
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(3px);
}

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 14px 16px;
}

.dialog-title {
  font-size: 18px;
  font-weight: 780;
}

.dialog-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
}

.dialog-close:hover {
  background: #f1f5f9;
}

.image-gallery {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.screenshot-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  overflow: hidden;
}

.screenshot-card figcaption {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: #344054;
  font-weight: 750;
  padding: 10px 12px;
}

.screenshot-card img {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.steps {
  counter-reset: step;
  padding: 8px 0;
}

.step {
  position: relative;
  padding: 18px 22px 18px 64px;
  border-bottom: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 0;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5faf6;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
}

.step h3 {
  margin-top: 0;
}

.callout {
  padding: 14px 16px;
  margin: 16px 0;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

.callout.info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.callout.warn {
  border-color: #fcd34d;
  background: #fffbeb;
}

.callout.danger {
  border-color: #fecaca;
  background: #fff1f2;
}

.kv {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px 14px;
  padding: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.kv dt {
  color: var(--muted);
  font-weight: 700;
}

.kv dd {
  margin: 0;
  min-width: 0;
}

code {
  border-radius: 6px;
  background: #eef2f7;
  color: #1d2939;
  padding: 2px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.code-block {
  position: relative;
  margin: 14px 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--code-bg);
  color: var(--code-text);
}

.code-block pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
}

.code-block code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 5px 9px;
}

.copy:hover {
  background: rgba(255, 255, 255, 0.16);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #f1f5f9;
  color: #344054;
  font-size: 14px;
}

.table tr:last-child td {
  border-bottom: 0;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
  padding: 12px;
}

.pager a {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.pager a:hover {
  background: #eef6f5;
}

.pager span {
  color: var(--muted);
  font-size: 12px;
}

.mobile-nav {
  display: none;
  margin-bottom: 16px;
}

.mobile-nav select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 12px;
  font: inherit;
}

.muted {
  color: var(--muted);
}

.checklist {
  padding-left: 20px;
}

.checklist li {
  margin: 7px 0;
}

@media (max-width: 840px) {
  .shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 18px 14px 34px;
  }

  .mobile-nav {
    display: block;
  }

  .hero {
    padding: 20px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .overview {
    padding: 18px;
  }

  .overview-head,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .overview-head {
    flex-direction: column;
  }

  .kv {
    grid-template-columns: 1fr;
  }

  .step {
    padding-left: 56px;
  }

  .pager {
    flex-direction: column;
  }
}
