:root {
  color-scheme: light;
  --bg: #f7f4fc;
  --card: #ffffff;
  --text: #2d2640;
  --muted: #6b6280;
  --line: rgba(155, 135, 212, 0.18);
  --accent: #9b87d4;
  --accent-soft: #f0ebfa;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.72;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 252, 0.92);
  backdrop-filter: blur(12px);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.topbar-brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.topbar-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.topbar-links a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.topbar-links a:hover,
.doc-tabs a.active {
  color: var(--accent);
}

.doc-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 24px 18px 40px;
}

.doc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 34px;
  box-shadow: 0 14px 36px rgba(109, 84, 168, 0.08);
}

.doc-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.doc-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

h1 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.25;
}

h2 {
  margin: 30px 0 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 22px;
  line-height: 1.35;
}

h3 {
  margin: 22px 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

p,
li {
  margin: 8px 0;
  font-size: 16px;
  color: var(--text);
  word-break: break-word;
}

ul {
  margin: 8px 0 8px 20px;
  padding: 0;
}

a {
  color: #7c6bb8;
  font-weight: 700;
  text-decoration: none;
}

a:active,
a:hover {
  text-decoration: underline;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f3f4f7;
  font-size: 0.92em;
}

.table-wrap {
  width: 100%;
  margin: 14px 0 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.55;
}

th {
  background: #fafbfc;
  font-weight: 800;
  color: #303540;
}

tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 640px) {
  .doc-shell {
    padding: 0;
  }

  .doc-card {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    padding: 18px 16px 32px;
    box-shadow: none;
  }

  h1 {
    font-size: 25px;
  }

  h2 {
    margin-top: 24px;
    font-size: 19px;
  }

  h3 {
    font-size: 17px;
  }

  p,
  li {
    font-size: 15px;
  }

  th,
  td {
    padding: 10px;
    font-size: 13px;
  }
}
