:root {
  --bg: #f7f5ef;
  --bg-soft: #fcfbf7;
  --panel: #ffffff;
  --panel-alt: #fffaf0;
  --text: #1f2937;
  --text-soft: #4b5563;
  --text-muted: #6b7280;
  --line: #e7e1d6;
  --line-strong: #d9cfbe;
  --brand: #c58b1a;
  --brand-soft: #f8edd0;
  --code-bg: #1f2430;
  --code-text: #edf2f7;
  --blue: #2563eb;
  --shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(245, 220, 160, 0.22), transparent 22%),
    linear-gradient(180deg, #fbfaf6 0%, #f5f3ec 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.75;
}

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

code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

code {
  padding: 0.12rem 0.38rem;
  border-radius: 6px;
  background: #f4efe4;
  color: #7a4e00;
  font-size: 0.95em;
}

pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  background: rgba(251, 250, 246, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231, 225, 214, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f2c766, #d7921f);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(197, 139, 26, 0.18);
}

.brand-text {
  color: #111827;
  letter-spacing: 0.01em;
}

.topnav {
  display: inline-flex;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.topnav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 600;
}

.topnav a.active,
.topnav a:hover {
  color: #111827;
  background: var(--brand-soft);
}

.doc-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  padding: 32px 0 56px;
}

.doc-layout-single {
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.sidebar-kicker,
.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.doc-sidebar h1 {
  margin: 12px 0 10px;
  font-size: 30px;
  line-height: 1.2;
}

.sidebar-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
}

.toc {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}

.toc a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
  transition: all 0.18s ease;
}

.toc a:hover {
  color: var(--text);
  background: #f8f4ea;
}

.doc-content {
  display: grid;
  gap: 18px;
}

.doc-hero {
  padding: 32px;
  border: 1px solid #eadfca;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdf7 0%, #fff8ea 100%);
  box-shadow: var(--shadow);
}

.doc-hero h2 {
  margin: 14px 0 12px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.doc-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--text-soft);
  font-size: 17px;
}

.doc-content section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.doc-content h3 {
  margin: 0 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
  font-size: 26px;
  line-height: 1.25;
}

.doc-content h4 {
  margin: 24px 0 12px;
  font-size: 18px;
  line-height: 1.35;
}

.doc-content p,
.doc-content li {
  color: var(--text-soft);
  font-size: 15px;
}

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

.doc-content li + li {
  margin-top: 6px;
}

.doc-content pre {
  position: relative;
  overflow: auto;
  margin: 14px 0 0;
  padding: 18px 18px 18px;
  border: 1px solid #2d3445;
  border-radius: 14px;
  background: var(--code-bg);
  color: var(--code-text);
  font-size: 13px;
  line-height: 1.7;
}

.copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  cursor: pointer;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.table-wrap {
  overflow: auto;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

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

th {
  background: #fbf8f1;
  color: #7a4e00;
  font-weight: 700;
}

td {
  color: var(--text-soft);
}

.callout,
.contact-card {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid #ecdcae;
  border-radius: 14px;
  background: #fff9e7;
}

.callout strong,
.contact-card strong {
  color: #855200;
}

.callout p,
.contact-card p {
  margin: 8px 0 0;
}

.feature-grid,
.download-grid {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.download-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-card,
.download-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfbf7;
}

.mini-card strong,
.download-title {
  display: block;
  margin: 0 0 8px;
  color: #7a4e00;
  font-size: 15px;
  font-weight: 700;
}

.mini-card p,
.download-card p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 14px;
}

.link-text {
  color: var(--blue);
  font-weight: 600;
  word-break: break-all;
}

.link-text:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .doc-sidebar {
    position: static;
  }

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

@media (max-width: 720px) {
  .shell {
    width: min(1180px, calc(100vw - 24px));
  }

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

  .topnav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .doc-hero,
  .doc-content section,
  .doc-sidebar {
    padding: 20px;
  }

  .doc-hero h2 {
    font-size: 30px;
  }

  .doc-content h3 {
    font-size: 22px;
  }

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