:root {
  --bg: #f6f8fc;
  --panel: #ffffff;
  --line: #dbe4f0;
  --text: #0f172a;
  --muted: #5b6b81;
  --blue: #1d4ed8;
  --blue-soft: #eff6ff;
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.12), transparent 28%),
    linear-gradient(180deg, #fbfcff 0%, #eef3f9 100%);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

body {
  overflow-y: auto;
}

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

a:hover {
  text-decoration: underline;
}

.page-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.docs-brand {
  margin-bottom: 16px;
}

.docs-brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 360px);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.hero-card,
.doc-card,
.toc {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-card {
  padding: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p,
.doc-card p,
.doc-card li {
  color: var(--muted);
  line-height: 1.75;
}

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

.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
}

.primary-link {
  background: var(--blue);
  color: #fff;
}

.primary-link:hover {
  text-decoration: none;
}

.ghost-link {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.hero-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.card-label,
.toc-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  word-break: break-all;
}

.content-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
}

.toc {
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 20px;
  display: grid;
  gap: 10px;
}

.toc a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 12px;
}

.toc a:hover {
  color: var(--blue);
  background: var(--blue-soft);
  text-decoration: none;
}

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

.doc-card {
  padding: 28px;
}

.doc-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.doc-card h3 {
  margin: 24px 0 12px;
  font-size: 18px;
}

.info-banner,
.service-block,
.tester-panel {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #d9e8ff;
}

.service-title {
  color: var(--muted);
  margin-bottom: 8px;
}

.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 700;
}

.tester-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tester-input {
  flex: 1 1 420px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
}

.tester-input:focus {
  outline: 2px solid rgba(29, 78, 216, 0.18);
  border-color: #b7cdf9;
}

.tester-button {
  min-width: 128px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.tester-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.tester-help {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.tester-status {
  margin-top: 14px;
  min-height: 24px;
  font-weight: 700;
}

.tester-status.loading {
  color: #475569;
}

.tester-status.success {
  color: #166534;
}

.tester-status.warning {
  color: #a16207;
}

.tester-status.error {
  color: #b91c1c;
}

.tester-result {
  margin-top: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
}

.result-title {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.result-cell {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #e2e8f0;
}

.result-key {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.result-value {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  word-break: break-word;
}

pre {
  margin: 14px 0 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: 18px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.7;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  background: #f8fbff;
  color: var(--text);
}

.flat-list {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 960px) {
  .hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }

  .page-shell {
    width: min(100% - 24px, 1280px);
    padding-top: 16px;
  }
}
