:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: #f7f8fb;
  --text: #111827;
  --muted: #5f6b7a;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-2: #0f766e;
  --code-bg: #eef2ff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(200px, 360px) 1fr;
  gap: 22px;
  align-items: center;
  min-height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 13px;
}

.search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
  height: 38px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}

kbd {
  min-width: 44px;
  padding: 2px 6px;
  border: 1px solid #d1d5db;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  color: #6b7280;
  font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.nav {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  color: #4b5563;
  font-size: 14px;
}

.nav a:hover,
.sidebar a:hover,
.content a:not(.button):hover {
  color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 900px);
  gap: 44px;
  max-width: 1230px;
  margin: 0 auto;
  padding: 44px 28px 60px;
}

.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #4b5563;
  font-size: 14px;
}

.sidebar-title {
  margin-bottom: 8px;
  color: #111827;
  font-weight: 700;
}

.sidebar a {
  padding: 7px 0;
}

.hero {
  padding: 18px 0 28px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
}

h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.25;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
}

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

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 42px;
}

.card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 28px;
  margin-bottom: 18px;
  border-radius: 7px;
  background: #e0f2fe;
  color: #0369a1;
  font: 700 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.card h2 {
  font-size: 19px;
}

.card p,
.doc-section p,
li {
  color: var(--muted);
}

.doc-section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

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

th {
  background: var(--panel);
  font-size: 14px;
}

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

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--code-bg);
  color: #3730a3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.notice {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
}

.notice p {
  margin: 6px 0 0;
}

.support {
  padding-bottom: 20px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1230px;
  margin: 0 auto;
  padding: 24px 28px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 88px 18px 18px;
  background: rgba(15, 23, 42, 0.38);
}

.search-panel {
  max-width: 680px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
}

.search-panel input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  outline: 0;
}

.search-results {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}

.search-results a,
.search-empty {
  display: block;
  padding: 12px;
  border-radius: 7px;
  color: #374151;
}

.search-results a:hover {
  background: var(--panel);
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 18px;
  }

  .search {
    grid-column: 1 / -1;
    order: 3;
    margin-bottom: 12px;
  }

  .nav {
    display: none;
  }

  .layout {
    display: block;
    padding: 30px 18px 46px;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-title {
    grid-column: 1 / -1;
  }

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

  footer {
    flex-direction: column;
    padding-inline: 18px;
  }
}
