:root {
  --bg: #ffffff;
  --bg-elevated: #f4f6f8;
  --bar: #f6f7f9;
  --panel: #f4f6f8;
  --panel-2: #eef1f5;
  --line: rgba(28, 36, 48, 0.1);
  --text: #1c2430;
  --muted: #5c6778;
  --accent: #3b6fe0;
  --accent-hover: #2f5ec4;
  --accent-muted: rgba(59, 111, 224, 0.1);
  --success: #1f9d5a;
  --warn: #9a6b00;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 12px 32px rgba(28, 36, 48, 0.12);
  color-scheme: light;
  --sidebar: 17.5rem;
  --content: 46rem;
  font-family: "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

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

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: var(--sidebar);
  height: 100vh;
  overflow: auto;
  background: var(--bar);
  border-right: 1px solid var(--line);
  padding: 1.25rem 0.85rem 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0.65rem 1rem;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  flex-shrink: 0;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.2;
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.side-group {
  margin: 1.15rem 0 0.25rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.side-link {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.92rem;
  text-decoration: none;
}

.side-group + .side-link,
.side-link + .side-link {
  margin-left: 0.35rem;
}

.side-nav > .side-link:first-child {
  margin-left: 0;
}

.side-link:hover {
  color: var(--text);
  background: rgba(28, 36, 48, 0.05);
  text-decoration: none;
}

.side-link.active {
  color: var(--accent);
  background: var(--accent-muted);
  font-weight: 650;
}

.content-wrap {
  margin-left: var(--sidebar);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mobile-bar {
  display: none;
}

main {
  flex: 1;
  width: 100%;
  max-width: calc(var(--content) + 4rem);
  margin: 0 auto;
  padding: 2.75rem 2rem 3rem;
}

.doc-page {
  display: none;
}

.doc-page:target {
  display: block;
}

body:not(:has(.doc-page:target)) #intro {
  display: block;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 em {
  font-style: normal;
  color: var(--warn);
}

h2 {
  margin: 2rem 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

p strong,
.callout strong {
  color: var(--text);
  font-weight: 600;
}

.lead {
  max-width: 40rem;
  font-size: 1.08rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--accent-muted);
  border: 1px solid rgba(59, 111, 224, 0.22);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.hero-badge span.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.feature-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  color: inherit;
  text-decoration: none;
}

.feature-card:hover {
  border-color: rgba(59, 111, 224, 0.45);
  text-decoration: none;
  color: inherit;
}

.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
}

.feature-meta {
  margin-top: 0.75rem !important;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 0.5rem 0 1.25rem;
}

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

.info-table th {
  color: var(--muted);
  font-weight: 500;
  width: 8.5rem;
}

.info-table td {
  color: var(--text);
}

.callout {
  background: var(--panel);
  border-left: 3px solid var(--warn);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--text);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.5rem;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--accent-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.steps strong {
  color: var(--text);
}

.note {
  font-size: 0.875rem;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bar);
  padding: 1.25rem 2rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--content);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.backdrop {
  display: none;
}

@media (max-width: 960px) {
  .sidebar {
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(0, 0, 0, 0.45);
  }

  .backdrop[hidden] {
    display: none;
  }

  .content-wrap {
    margin-left: 0;
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .menu-btn {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    border-radius: 8px;
    padding: 0.35rem 0.7rem;
    font: inherit;
    cursor: pointer;
  }

  .mobile-brand {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-brand:hover {
    color: var(--text);
    text-decoration: none;
  }

  main {
    padding: 1.5rem 1.15rem 2.5rem;
  }

  .doc-page {
    scroll-margin-top: 4.25rem;
  }
}
