@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-soft: #eff6ff;
  --text: #111827;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --border: #e5e7eb;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,.06);
  --bar-h: 60px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-w: 1280px;
  --page-max: 1280px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a,
a:hover,
a:focus,
a:active,
a:visited {
  color: var(--primary);
  text-decoration: none !important;
  transition: color .2s;
}

a:hover { color: var(--primary-hover); }

.pub-app a,
.pub-btn,
.m-btn,
.pub-foot a {
  text-decoration: none !important;
}
img { max-width: 100%; display: block; }

/* ===== Public layout (match user center) ===== */
body.pub {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

.pub-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pub-main { flex: 1; }

.pub-foot {
  padding: 20px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.pub-foot a { color: var(--primary) !important; }

/* ===== Top bar (shared with user center) ===== */
.uc-bar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.uc-bar__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  height: var(--bar-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.uc-bar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text) !important;
  flex-shrink: 0;
}

.uc-bar__brand img { width: 28px; height: 28px; border-radius: 7px; }

.uc-bar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.uc-bar__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all .15s;
}

.uc-bar__link i { font-size: 13px; opacity: .75; }

.uc-bar__link:hover {
  color: var(--text) !important;
  background: var(--bg);
}

.uc-bar__link.active {
  color: var(--primary) !important;
  background: var(--primary-soft);
  font-weight: 600;
}

.uc-bar__end {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.uc-bar__toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.uc-bar__nav-cta { display: none; }

.pub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.pub-btn--primary {
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
}

.pub-btn--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* ===== Public page ===== */
.pub-page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.pub-page__head { margin-bottom: 24px; }

.pub-page__title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 6px;
  color: var(--text);
}

.pub-page__desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.pub-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.pub-panel--success { border-color: #bbf7d0; }

.pub-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.pub-panel__head h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.pub-panel--success .pub-panel__head h3 { color: #15803d; }
.pub-panel--success .pub-panel__head h3 i { color: #16a34a; }

.pub-panel__head span {
  font-size: 13px;
  color: var(--text-secondary);
}

.pub-panel__body { padding: 24px; }

.pub-test-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.pub-test-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 12px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}

.pub-test-item:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.pub-test-item__logo {
  width: 52px;
  height: 52px;
  background: var(--surface);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-test-item__logo img { width: 30px; height: 30px; object-fit: contain; }

.pub-test-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

.pub-test-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pub-test-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.pub-test-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 13px;
  color: var(--text);
}

.pub-test-field--wide { grid-column: 1 / -1; }

.m-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all .2s;
}

.m-btn--primary {
  background: var(--primary);
  color: #fff !important;
}

.m-btn--primary:hover {
  background: var(--primary-hover);
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(59,130,246,.3);
}

.m-btn--outline {
  background: var(--surface);
  color: var(--text) !important;
  border: 1px solid var(--border);
}

.m-btn--outline:hover { border-color: var(--primary); color: var(--primary) !important; }

.m-btn--lg { padding: 13px 28px; font-size: 15px; border-radius: var(--radius); }

/* ===== Homepage ===== */
.m-hero {
  padding: 72px 24px 80px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.m-hero__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.m-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 20px;
}

.m-hero h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--text);
  margin-bottom: 16px;
}

.m-hero h1 span { color: var(--primary); }

.m-hero__desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 440px;
}

.m-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.m-hero__visual {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 50%, #faf5ff 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
}

.m-hero__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.m-hero__plat {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}

.m-hero__plat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.m-hero__plat i { font-size: 28px; margin-bottom: 8px; display: block; }
.m-hero__plat span { font-size: 12px; font-weight: 600; color: var(--text-secondary); }

/* Stats */
.m-stats {
  max-width: var(--max-w);
  margin: -32px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.m-stats__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.m-stat {
  text-align: center;
  padding: 20px 12px;
  border-radius: var(--radius);
}

.m-stat strong {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.m-stat span { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

/* Sections */
.m-section {
  padding: 80px 24px;
}

.m-section--gray { background: var(--bg); }

.m-container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.m-section__head {
  text-align: center;
  margin-bottom: 48px;
}

.m-section__head h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}

.m-section__head p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* About */
.m-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.m-about__text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}

.m-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.m-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Feature cards */
.m-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.m-feat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all .25s;
}

.m-feat:hover {
  border-color: transparent;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.m-feat__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 16px;
}

.m-feat h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.m-feat p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* CTA */
.m-cta {
  padding: 0 24px 80px;
}

.m-cta__box {
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--primary);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.m-cta__box h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.m-cta__box p { color: rgba(255,255,255,.8); font-size: 15px; margin: 0; }

.m-cta__box .m-btn--outline {
  background: #fff;
  border-color: #fff;
  color: var(--primary) !important;
  font-weight: 600;
}

.m-cta__box .m-btn--outline:hover { background: var(--primary-soft); }

/* ===== Doc page ===== */
body.m-doc, body.m-test { background: var(--bg); }

.m-doc-top {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px 32px;
}

.m-doc-top__inner { max-width: var(--max-w); margin: 0 auto; }

.m-doc-top h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 6px;
}

.m-doc-top p { color: var(--text-secondary); font-size: 15px; }

.m-doc-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 16px;
  width: 100%;
  min-width: 0;
}

.m-doc-main {
  min-width: 0;
}

.m-doc-aside {
  position: sticky;
  top: calc(var(--bar-h) + 16px);
  min-width: 0;
}

.m-doc-menu-wrap {
  max-width: 100%;
}

.m-doc-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m-doc-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all .15s;
}

.m-doc-menu a i {
  width: 16px;
  text-align: center;
  font-size: 12px;
  opacity: .65;
  flex-shrink: 0;
}

.m-doc-menu a:hover i,
.m-doc-menu a.active i { opacity: 1; }

.m-doc-menu a:hover,
.m-doc-menu a.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.m-doc-main .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 80px;
}

.m-doc-main .card-header {
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.m-doc-main .card-body {
  padding: 20px;
  min-width: 0;
  max-width: 100%;
}
.m-doc-main .card-body p { font-size: 14px; color: var(--text-secondary); margin-bottom: 10px; }
.m-doc-main strong { color: var(--text); font-weight: 600; }

.m-doc-main code {
  font-size: 13px;
  background: #f1f5f9;
  color: #334155;
  padding: 2px 6px;
  border-radius: 4px;
}

.m-doc-main pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 12px 0;
}

/* Doc tables */
.m-doc-table-box {
  margin: 12px 0 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.m-doc-table-box__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border);
}

.m-doc-table-box__head i {
  color: var(--primary);
  font-size: 12px;
}

.m-doc-table-box__body {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
}

.m-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.m-doc-table thead th {
  padding: 11px 16px;
  background: #f8fafc;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.m-doc-table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
  line-height: 1.55;
}

.m-doc-table tbody tr:last-child td { border-bottom: none; }

.m-doc-table tbody tr:hover td { background: #f8fafc; }

.m-doc-table--params th:nth-child(1),
.m-doc-table--params td:nth-child(1) { width: 14%; }

.m-doc-table--params th:nth-child(2),
.m-doc-table--params td:nth-child(2) { width: 10%; }

.m-doc-table--params th:nth-child(3),
.m-doc-table--params td:nth-child(3) { width: 22%; }

.m-doc-table--params th:nth-child(4),
.m-doc-table--params td:nth-child(4) { width: 54%; }

.m-doc-table--types th:nth-child(1),
.m-doc-table--types td:nth-child(1) { width: 28%; }

.m-doc-param {
  display: inline-block;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: #1e40af;
  background: #eff6ff;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #dbeafe;
  line-height: 1.4;
}

.m-doc-cell-type {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
  color: #7c3aed;
}

.m-doc-cell-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.m-doc-table td.m-doc-cell-example {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: #475569;
  word-break: break-all;
  line-height: 1.65;
  background: #f8fafc;
}

.m-doc-table tbody tr:hover td.m-doc-cell-example { background: #f1f5f9; }

.m-doc-table--types td:last-child {
  font-size: 13px;
  color: var(--text);
}

.m-doc-intro {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, #f0f9ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  align-items: flex-start;
}

.m-doc-intro > i {
  font-size: 28px;
  color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
}

.m-doc-intro p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 12px;
}

.m-doc-intro strong { color: var(--text); }

.m-doc-intro__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.m-doc-intro__tags span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(255,255,255,.75);
  border-radius: 999px;
  border: 1px solid rgba(59,130,246,.15);
}

.m-doc-intro__tags i { font-size: 10px; }

.m-doc-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.m-doc-card-head i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 14px;
  flex-shrink: 0;
}

.m-doc-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.m-doc-spec {
  padding: 20px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color .2s, box-shadow .2s;
}

.m-doc-spec:hover {
  border-color: #bfdbfe;
  box-shadow: 0 2px 8px rgba(59,130,246,.08);
}

.m-doc-spec__icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 50%;
  font-size: 16px;
}

.m-doc-spec__label {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.m-doc-spec__value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}

.m-doc-step {
  position: relative;
  padding: 0 0 28px 24px;
  margin-bottom: 4px;
  border-left: 2px solid #dbeafe;
}

.m-doc-step:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
}

.m-doc-step__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  margin-left: -36px;
}

.m-doc-step__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(59,130,246,.35);
}

.m-doc-step__head strong {
  font-size: 15px;
  color: var(--text);
}

.m-doc-step__body p:last-child { margin-bottom: 0; }

.m-doc-step__body {
  min-width: 0;
  max-width: 100%;
}

.m-doc-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 18px 0 8px;
}

.m-doc-label:first-child { margin-top: 0; }

.m-doc-label i {
  color: var(--text-light);
  font-size: 12px;
}

.m-doc-endpoint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.m-doc-endpoint__method {
  flex-shrink: 0;
  padding: 3px 8px;
  margin-top: 1px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: .04em;
  font-family: var(--font);
}

.m-doc-endpoint code {
  flex: 1;
  background: transparent !important;
  padding: 0 !important;
  word-break: break-all;
  line-height: 1.55;
  font-size: 12px;
}

.m-doc-pre {
  position: relative;
  margin: 8px 0 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
  border-radius: var(--radius-sm);
}

.m-doc-pre__tag {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255,255,255,.08);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .06em;
  text-transform: uppercase;
  z-index: 1;
}

.m-doc-pre pre { margin: 0; }

.m-doc-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #92400e;
  line-height: 1.6;
  margin: 12px 0 4px;
}

.m-doc-tip i {
  margin-top: 3px;
  flex-shrink: 0;
  color: #d97706;
}

.m-doc-tip code {
  background: rgba(255,255,255,.6);
  color: #b45309;
}

.m-doc-sdk {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, #f0fdf4 100%);
  border-radius: var(--radius);
  border: 1px solid #bfdbfe;
}

.m-doc-sdk__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--primary);
  border-radius: var(--radius);
  font-size: 24px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.m-doc-sdk__info { flex: 1; min-width: 0; }

.m-doc-sdk__info h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}

.m-doc-sdk__info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 8px;
  line-height: 1.6;
}

.m-doc-sdk__ver {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(255,255,255,.8);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(59,130,246,.2);
}

.m-doc-sdk__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ===== Test page ===== */
.m-test-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 45%, #4f46e5 100%);
  padding: 64px 32px 72px;
  color: #fff;
  overflow: hidden;
}

.m-test-hero__wrap {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.m-test-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,.14);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.m-test-hero__content h1 {
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.03em;
  margin-bottom: 16px;
}

.m-test-hero__content > p {
  font-size: 16px;
  color: rgba(255,255,255,.82);
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 460px;
}

.m-test-flow {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m-test-flow li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.9);
}

.m-test-flow li span {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.m-test-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.m-test-hero__stat {
  width: 100%;
  max-width: 280px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}

.m-test-hero__stat strong {
  display: block;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.m-test-hero__stat span {
  font-size: 15px;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
}

.m-test-hero__icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 320px;
}

.m-test-hero__icons img {
  width: 44px;
  height: 44px;
  padding: 8px;
  background: rgba(255,255,255,.95);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  object-fit: contain;
}

.m-test-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 32px 80px;
}

.m-test-output {
  background: var(--surface);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}

.m-test-output__banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #dcfce7;
}

.m-test-output__banner > i {
  font-size: 36px;
  color: #16a34a;
  flex-shrink: 0;
}

.m-test-output__banner strong {
  display: block;
  font-size: 18px;
  color: #15803d;
  margin-bottom: 2px;
}

.m-test-output__banner p {
  font-size: 14px;
  color: #16a34a;
  margin: 0;
}

.m-test-output__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.m-test-output__field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.m-test-output__field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 13px;
  color: var(--text);
}

.m-test-output__field--wide { grid-column: 1 / -1; }

.m-test-choose__head {
  margin-bottom: 32px;
}

.m-test-choose__head h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 8px;
  color: var(--text);
}

.m-test-choose__head p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

.m-test-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.m-test-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 28px 16px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all .25s;
  font-family: inherit;
  text-align: center;
  box-shadow: var(--shadow);
}

.m-test-item:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 8px 24px rgba(59,130,246,.12);
  transform: translateY(-3px);
}

.m-test-item__logo {
  width: 64px;
  height: 64px;
  background: var(--bg);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s;
}

.m-test-item:hover .m-test-item__logo { transform: scale(1.06); }

.m-test-item__logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.m-test-item__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  word-break: break-all;
}

/* ===== Plugins page ===== */
body.m-plugins { background: var(--bg); }

.m-plugins-intro {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary-soft) 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  align-items: flex-start;
}

.m-plugins-intro > i {
  font-size: 28px;
  color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
}

.m-plugins-intro p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 10px;
}

.m-plugins-intro p:last-child { margin-bottom: 0; }

.m-plugins-intro strong { color: var(--text); }

.m-plugins-intro__tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255,255,255,.7);
  border-radius: var(--radius-sm);
  font-size: 13px !important;
}

.m-plugins-intro__tip i { color: var(--primary); margin-top: 3px; flex-shrink: 0; }

.m-plugins-intro code {
  font-size: 12px;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.m-plugins-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.m-plugins-filter__btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
}

.m-plugins-filter__btn:hover {
  color: var(--primary);
  border-color: #bfdbfe;
  background: var(--primary-soft);
}

.m-plugins-filter__btn.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.m-plugins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding-bottom: 8px;
}

.m-plugin-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}

.m-plugin-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-md);
}

.m-plugin-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.m-plugin-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius);
  font-size: 20px;
  flex-shrink: 0;
}

.m-plugin-card__meta { min-width: 0; }

.m-plugin-card__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

.m-plugin-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.35;
}

.m-plugin-card__types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.m-plugin-card__types span {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
}

.m-plugin-card__install {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 10px;
}

.m-plugin-card__note {
  font-size: 12px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin: 0 0 12px;
  line-height: 1.6;
}

.m-plugin-card__note a { color: #b45309 !important; text-decoration: underline !important; }

.m-plugin-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.m-plugin-card__btn {
  flex: 1;
  min-width: 120px;
  justify-content: center;
  font-size: 13px;
  padding: 9px 14px;
}

.m-plugin-card__btn--ghost {
  background: var(--surface);
  color: var(--text-secondary) !important;
  border: 1px solid var(--border);
}

.m-plugin-card__btn--ghost:hover {
  color: var(--primary) !important;
  border-color: #bfdbfe;
  background: var(--primary-soft);
}

.m-plugin-card__cmd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 120px;
  justify-content: center;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: var(--radius-sm);
}

/* ===== Agreement page ===== */
body.m-agreement { background: var(--bg); }

.m-agree-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 16px;
}

.m-agree-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 44px;
}

.m-agree-intro {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: var(--primary-soft);
  border-radius: var(--radius);
  margin-bottom: 32px;
  align-items: flex-start;
}

.m-agree-intro i { font-size: 24px; color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.m-agree-intro p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin: 0; }
.m-agree-intro strong { color: var(--text); }

.m-agree-section { margin-bottom: 28px; }

.m-agree-section h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-soft);
}

.m-agree-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 16px 0 8px;
}

.m-agree-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 10px;
}

.m-agree-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  color: #92400e !important;
}

.m-agree-warn i { margin-top: 3px; flex-shrink: 0; }

.m-agree-foot {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Footer */
.m-footer {
  margin-top: auto;
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.m-footer a { color: var(--text-secondary); }
.m-footer a:hover { color: var(--primary); }

.m-links {
  text-align: center;
  padding: 16px 24px 32px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 960px) {
  .m-hero__inner { grid-template-columns: 1fr; }
  .m-hero__visual { order: -1; }
  .m-features { grid-template-columns: 1fr 1fr; }
  .m-about { grid-template-columns: 1fr; }
  .m-stats__row { grid-template-columns: 1fr 1fr; }
  .m-cta__box { flex-direction: column; text-align: center; }
  .m-doc-layout { grid-template-columns: minmax(0, 1fr); }
  .m-doc-aside {
    position: sticky;
    top: var(--bar-h);
    z-index: 10;
    margin-left: -24px;
    margin-right: -24px;
    padding: 0 24px 8px;
    background: var(--bg);
    min-width: 0;
    width: auto;
    overflow: visible;
    box-sizing: border-box;
  }
  .pub-test-grid { grid-template-columns: repeat(3, 1fr); }
  .m-doc-menu-wrap {
    display: block;
    width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    scrollbar-width: none;
    position: relative;
  }
  .m-doc-menu-wrap::-webkit-scrollbar { display: none; }
  .m-doc-menu-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(to right, rgba(255,255,255,0), var(--surface));
    pointer-events: none;
  }
  .m-doc-menu {
    display: block;
    white-space: nowrap;
    width: max-content;
    min-width: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 6px 8px;
    gap: 0;
  }
  .m-doc-menu a {
    display: inline-flex;
    align-items: center;
    vertical-align: top;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 12px;
    margin-right: 4px;
  }
  .m-doc-menu a:last-child { margin-right: 8px; }
  .m-doc-main .card-body {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .m-doc-table-box {
    max-width: 100%;
    overflow: hidden;
  }
  .m-doc-table-box__body {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }
  .m-doc-table--params {
    width: max-content;
    min-width: 560px;
    table-layout: auto;
  }
  .m-doc-table--params th:nth-child(1),
  .m-doc-table--params td:nth-child(1),
  .m-doc-table--params th:nth-child(2),
  .m-doc-table--params td:nth-child(2),
  .m-doc-table--params th:nth-child(3),
  .m-doc-table--params td:nth-child(3),
  .m-doc-table--params th:nth-child(4),
  .m-doc-table--params td:nth-child(4) { width: auto; }
  .m-doc-table--params td.m-doc-cell-example {
    white-space: nowrap;
    word-break: normal;
    min-width: 140px;
  }
  .m-doc-pre pre {
    white-space: pre;
    word-break: normal;
    overflow-x: auto;
  }
  .m-doc-endpoint {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }
  .m-doc-endpoint code {
    white-space: nowrap;
    word-break: normal;
  }
  .m-doc-table-box__body::after {
    content: '← 左右滑动查看更多 →';
    display: block;
    text-align: center;
    font-size: 11px;
    color: var(--text-light);
    padding: 8px 12px 4px;
    border-top: 1px dashed var(--border);
    background: #fafbfc;
  }
  .m-doc-pre::after {
    content: '← 左右滑动查看更多 →';
    display: block;
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    padding: 6px 12px;
    background: #1e293b;
    border-top: 1px solid rgba(255,255,255,.08);
  }
}

@media (max-width: 768px) {
  .uc-bar__toggle { display: flex; }
  .uc-bar__nav {
    display: none;
    position: absolute;
    top: var(--bar-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    box-shadow: var(--shadow-md);
    gap: 2px;
  }
  .uc-bar__nav.open { display: flex; }
  .uc-bar__link { padding: 12px 16px; }
  .uc-bar__inner { position: relative; padding: 0 16px; }
  .uc-bar__end .pub-btn--primary { display: none; }
  .uc-bar__nav-cta {
    display: block;
    padding: 10px 4px 4px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
  }
  .uc-bar__nav-cta .pub-btn {
    display: flex !important;
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }
  .uc-bar__brand { font-size: 14px; max-width: calc(100vw - 100px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 640px) {
  .m-features { grid-template-columns: 1fr; }
  .m-stats__row { grid-template-columns: 1fr 1fr; }
  .m-hero__grid { grid-template-columns: repeat(2, 1fr); }
  body.m-doc .pub-page { padding: 20px 16px 32px; max-width: 100%; overflow-x: visible; }
  .pub-page { padding: 20px 16px 32px; max-width: 100%; overflow-x: hidden; }
  .pub-page__title { font-size: 22px; }
  .m-doc-layout { gap: 16px; }
  .m-doc-aside {
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px 8px;
  }
  .m-doc-main .card {
    scroll-margin-top: calc(var(--bar-h) + 56px);
    overflow: hidden;
    max-width: 100%;
  }
  .m-doc-main .card-header { padding: 12px 16px; font-size: 14px; }
  .m-doc-main .card-body { padding: 16px; }
  .m-doc-main .card-body p { font-size: 14px; line-height: 1.75; }
  .m-doc-main pre {
    font-size: 11px;
    padding: 28px 12px 12px;
    white-space: pre;
    word-break: normal;
    overflow-x: visible;
  }
  .m-doc-main code { word-break: break-all; overflow-wrap: anywhere; }
  .m-doc-endpoint code { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
  .m-doc-intro { flex-direction: column; padding: 16px; gap: 12px; }
  .m-doc-specs { grid-template-columns: 1fr; }
  .m-doc-step {
    padding: 0 0 22px;
    margin-bottom: 0;
    border-left: none;
  }
  .m-doc-step + .m-doc-step {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
  }
  .m-doc-step__head {
    margin-left: 0;
    gap: 10px;
    margin-bottom: 12px;
  }
  .m-doc-step__head strong {
    font-size: 14px;
    line-height: 1.45;
    flex: 1;
    min-width: 0;
  }
  .m-doc-step__num { width: 26px; height: 26px; font-size: 12px; }
  .m-doc-endpoint {
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }
  .m-doc-endpoint__method { align-self: flex-start; margin-top: 0; }
  .m-doc-sdk { flex-direction: column; text-align: center; padding: 20px 16px; }
  .m-doc-sdk__btn { width: 100%; justify-content: center; }
  .m-doc-table-box__head {
    padding: 10px 12px;
    font-size: 12px;
  }
  .m-doc-table--params { min-width: 600px; }
  .m-doc-table thead th,
  .m-doc-table tbody td { padding: 10px 12px; font-size: 12px; }
  .m-doc-param { font-size: 11px; padding: 2px 6px; }
  .m-doc-tip { flex-direction: column; gap: 6px; padding: 12px; font-size: 12px; }
  .m-doc-label { font-size: 12px; }
  .pub-test-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pub-test-fields { grid-template-columns: 1fr; }
  .pub-panel__body { padding: 16px; }
  .m-agree-card { padding: 24px 16px; }
  .m-agree-intro { flex-direction: column; padding: 16px; gap: 12px; }
  .m-agree-section h2 { font-size: 16px; }
  .m-agree-section p { font-size: 14px; word-break: break-word; }
  .m-agree-foot { flex-direction: column; }
  .m-agree-foot .m-btn { width: 100%; justify-content: center; }
  .m-plugins-intro { flex-direction: column; padding: 16px; gap: 12px; }
  .m-plugins-grid { grid-template-columns: 1fr; }
  .m-plugin-card__foot { flex-direction: column; }
  .m-plugin-card__btn,
  .m-plugin-card__cmd { width: 100%; min-width: 0; }
}
