:root {
  color-scheme: light dark;
  --page: #f3f7f9;
  --surface: #fbfcfd;
  --surface-strong: #eef4f8;
  --ink: #142437;
  --muted: #617286;
  --line: #d7e2ea;
  --line-strong: #bdccd7;
  --brand: #2468cf;
  --brand-strong: #174f9f;
  --brand-soft: #e4efff;
  --green: #167c65;
  --green-soft: #e1f3ed;
  --amber: #9a5b12;
  --amber-soft: #fff0d8;
  --red: #a43a45;
  --red-soft: #fde9eb;
  --shadow: 0 18px 46px rgb(29 63 94 / 0.1);
  --radius: 8px;
  --header-height: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #111820;
    --surface: #17212b;
    --surface-strong: #1e2b37;
    --ink: #edf3f7;
    --muted: #aebbc7;
    --line: #31404d;
    --line-strong: #485a68;
    --brand: #6ca7ff;
    --brand-strong: #9bc2ff;
    --brand-soft: #203752;
    --green: #6dc6ad;
    --green-soft: #1d3a34;
    --amber: #e5b368;
    --amber-soft: #44351f;
    --red: #ef929b;
    --red-soft: #49272d;
    --shadow: 0 18px 46px rgb(0 0 0 / 0.28);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.72;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 50;
  padding: 8px 12px;
  color: #f7fbff;
  background: #15365d;
  border-radius: 6px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.header-inner,
.page-shell,
.footer-inner {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: #f6fbff;
  background: linear-gradient(145deg, #2468cf, #168b80);
  border: 1px solid rgb(255 255 255 / 0.3);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgb(36 104 207 / 0.24), inset 0 1px 0 rgb(255 255 255 / 0.34);
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.header-nav a:hover,
.header-nav a[aria-current="page"] {
  color: var(--brand);
}

.header-nav .nav-action {
  min-height: 38px;
  padding: 7px 13px;
  color: #f8fbff;
  background: var(--brand-strong);
  border-radius: var(--radius);
}

.page-intro {
  padding: 62px 0 48px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--brand-soft) 72%, transparent), transparent 52%),
    var(--surface);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 50px;
}

.intro-copy {
  max-width: 680px;
}

.context-label {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.24;
}

h1 {
  max-width: 700px;
  font-size: clamp(38px, 5vw, 58px);
}

.intro-lead {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  font-weight: 800;
}

.button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.button.primary {
  color: #f8fbff;
  background: var(--brand-strong);
  border-color: var(--brand-strong);
}

.intro-visual {
  position: relative;
  min-width: 0;
}

.intro-visual::before {
  content: "";
  position: absolute;
  inset: -12px 18px 18px -12px;
  z-index: 0;
  border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
  border-radius: var(--radius);
}

.intro-visual img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 58px;
  padding-top: 42px;
  padding-bottom: 80px;
}

.toc {
  position: sticky;
  top: calc(var(--header-height) + 22px);
  align-self: start;
}

.toc-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.toc nav {
  display: grid;
  gap: 3px;
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
}

.toc a {
  padding: 7px 10px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
}

.toc a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.toc-note {
  margin-top: 22px;
  padding: 14px;
  color: var(--muted);
  background: var(--surface-strong);
  border-radius: var(--radius);
  font-size: 13px;
}

.doc-content {
  min-width: 0;
}

.doc-section {
  padding: 8px 0 50px;
  border-bottom: 1px solid var(--line);
}

.doc-section + .doc-section {
  padding-top: 50px;
}

.doc-section:last-child {
  border-bottom: 0;
}

.doc-section h2 {
  max-width: 780px;
  font-size: clamp(27px, 3vw, 36px);
}

.section-lead {
  max-width: 760px;
  margin: 13px 0 0;
  color: var(--muted);
}

.doc-section h3 {
  margin-top: 30px;
  font-size: 21px;
}

.doc-section h4 {
  margin-top: 24px;
  font-size: 17px;
}

.doc-section p {
  margin: 12px 0 0;
}

.doc-section ul,
.doc-section ol {
  margin: 16px 0 0;
  padding-left: 22px;
}

.doc-section li + li {
  margin-top: 7px;
}

.quick-path {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.path-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.path-index {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-radius: 6px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.path-item h3 {
  margin: 0;
  font-size: 17px;
}

.path-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.callout {
  margin-top: 22px;
  padding: 18px 20px;
  color: var(--ink);
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
}

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

.callout.warning {
  background: var(--amber-soft);
  border-left-color: var(--amber);
}

.callout.danger {
  background: var(--red-soft);
  border-left-color: var(--red);
}

.callout.success {
  background: var(--green-soft);
  border-left-color: var(--green);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  margin-top: 24px;
}

.feature-item {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-item:nth-child(3n) {
  grid-column: span 2;
}

.feature-item h3 {
  margin: 0;
  font-size: 18px;
}

.feature-item p {
  color: var(--muted);
  font-size: 14px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  gap: 14px;
  margin-top: 26px;
}

.screenshot {
  margin: 0;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.screenshot img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
}

.screenshot figcaption {
  padding: 9px 6px 2px;
  color: var(--muted);
  font-size: 13px;
}

.data-table-wrap {
  margin-top: 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--surface);
}

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

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

th {
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 13px;
}

td {
  font-size: 14px;
}

.status-label {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 5px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-label.ready {
  color: var(--green);
  background: var(--green-soft);
}

.status-label.blocked {
  color: var(--red);
  background: var(--red-soft);
}

.status-label.review {
  color: var(--amber);
  background: var(--amber-soft);
}

.faq-list {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 18px 38px 18px 0;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  top: 16px;
  right: 6px;
  color: var(--brand);
  font-size: 22px;
}

.faq-list details[open] summary::after {
  content: "-";
}

.faq-answer {
  max-width: 800px;
  padding: 0 36px 20px 0;
  color: var(--muted);
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.source-link {
  padding: 13px 14px;
  color: var(--brand-strong);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 750;
}

.source-link:hover {
  border-color: var(--brand);
}

.checklist-group {
  margin-top: 24px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.checklist-group h3 {
  margin: 0 0 12px;
}

.checklist {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin: 0;
  padding-left: 28px;
}

.checklist li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-strong);
  border-radius: 4px;
  background: var(--page);
}

.site-footer {
  padding: 34px 0;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

@media (max-width: 900px) {
  .intro-grid,
  .page-shell {
    grid-template-columns: 1fr;
  }

  .intro-grid {
    gap: 36px;
  }

  .toc {
    position: static;
  }

  .toc nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 0;
    padding-left: 0;
  }

  .toc-note {
    display: none;
  }

  .page-shell {
    gap: 34px;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 62px;
  }

  .header-inner,
  .page-shell,
  .footer-inner {
    width: min(100% - 24px, 1220px);
  }

  .header-inner {
    gap: 12px;
  }

  .header-nav a:not(.nav-action) {
    display: none;
  }

  .brand-text {
    max-width: none;
    font-size: 14px;
  }

  .header-nav {
    flex: 0 0 auto;
  }

  .page-intro {
    padding: 38px 0 34px;
  }

  h1 {
    font-size: 38px;
    overflow-wrap: anywhere;
  }

  .intro-lead {
    font-size: 16px;
  }

  .intro-actions .button {
    flex: 1 1 150px;
    min-width: 0;
    padding-inline: 10px;
  }

  .intro-visual::before {
    inset: -7px 10px 10px -7px;
  }

  .page-shell {
    padding-top: 26px;
    padding-bottom: 50px;
  }

  .toc nav,
  .quick-path,
  .feature-grid,
  .source-list,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .feature-item:nth-child(3n) {
    grid-column: auto;
  }

  .doc-section {
    padding-bottom: 38px;
  }

  .doc-section + .doc-section {
    padding-top: 38px;
  }

  .path-item,
  .feature-item,
  .checklist-group {
    padding: 16px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  :root {
    color-scheme: light;
    --page: #f7f8f9;
    --surface: #fbfcfd;
    --surface-strong: #eef2f5;
    --ink: #142437;
    --muted: #526273;
    --line: #cfd8df;
  }

  .site-header,
  .toc,
  .intro-actions,
  .site-footer {
    display: none;
  }

  .page-intro {
    padding: 20px 0;
  }

  .page-shell,
  .header-inner,
  .footer-inner {
    width: 100%;
  }

  .page-shell {
    display: block;
    padding: 20px 0;
  }

  .doc-section,
  .checklist-group,
  .path-item {
    break-inside: avoid;
  }
}
