:root {
  --bg: #060913;
  --surface: #0f172a;
  --surface-elevated: #131d36;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.3);
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --emerald: #34d399;
  --emerald-deep: #10b981;
  --cyan: #38bdf8;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  background:
    radial-gradient(circle at 16% 0%, rgba(52, 211, 153, 0.11), transparent 36%),
    radial-gradient(circle at 86% 8%, rgba(56, 189, 248, 0.08), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

.doc-wrap {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

.doc-header {
  border-bottom: 1px solid var(--border);
  background: rgba(6, 9, 19, 0.88);
  backdrop-filter: blur(14px);
}

.doc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 14px;
}

.doc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.doc-brand strong {
  display: block;
  font-size: 15.5px;
  line-height: 1.2;
}

.doc-brand small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.doc-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.doc-back {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: border-color 0.2s, color 0.2s;
}

.doc-back:hover {
  border-color: rgba(52, 211, 153, 0.48);
  color: var(--text);
}

.doc-back-primary {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.36);
  color: var(--emerald);
  font-weight: 600;
}

.doc-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0;
}

.doc-tabs::-webkit-scrollbar {
  display: none;
}

.doc-tab {
  position: relative;
  flex: none;
  padding: 10px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  white-space: nowrap;
  transition: color 0.2s;
}

.doc-tab:hover {
  color: var(--text);
}

.doc-tab.is-active {
  color: var(--emerald);
  font-weight: 600;
}

.doc-tab.is-active::after {
  content: '';
  position: absolute;
  inset: auto 10px 0;
  border-block-end: 2px solid var(--emerald);
}

.doc-main {
  flex: 1;
  padding-top: 38px;
  padding-bottom: 64px;
}

.doc-hero {
  margin-bottom: 24px;
}

.doc-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--emerald);
  font-weight: 700;
  margin-bottom: 8px;
}

.doc-hero h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.doc-meta {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.doc-toc {
  margin: 0 0 28px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
}

.doc-toc strong {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.doc-toc ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.doc-toc a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
}

.doc-toc a:hover {
  color: var(--emerald);
  text-decoration: underline;
}

.doc-article {
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 36px);
}

.doc-article h2 {
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.doc-article h2:first-child {
  margin-top: 0;
}

.doc-article h3 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
}

.doc-article h4 {
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 14.5px;
  color: var(--cyan);
}

.doc-article p {
  margin: 10px 0;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.doc-article strong {
  color: var(--text);
  font-weight: 650;
}

.doc-article a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-article a:hover {
  color: var(--emerald);
}

.doc-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.14);
  color: #a7f3d0;
  word-break: break-word;
}

.doc-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}

.doc-callout {
  margin: 18px 0 22px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.28);
}

.doc-callout p {
  margin: 4px 0;
  color: #e2e8f0;
  font-size: 14px;
}

.doc-list,
.doc-olist {
  margin: 10px 0 14px 20px;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.doc-list li,
.doc-olist li {
  margin: 6px 0;
}

.doc-sublist {
  margin: 6px 0 8px 18px;
  list-style: disc;
}

.doc-table-wrap {
  margin: 16px 0 20px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  container-type: inline-size;
}

.doc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.doc-table th,
.doc-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.doc-table thead th {
  background: var(--surface-elevated);
  color: var(--text);
  font-weight: 650;
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
}

.doc-table tbody th {
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  font-weight: 600;
}

.doc-table tbody tr:last-child th,
.doc-table tbody tr:last-child td {
  border-bottom: 0;
}

@container (width < 560px) {
  .doc-table,
  .doc-table thead,
  .doc-table tbody,
  .doc-table tr,
  .doc-table th,
  .doc-table td {
    display: block;
  }

  .doc-table thead {
    display: none;
  }

  .doc-table tr {
    border-bottom: 1px solid var(--border-strong);
    padding: 8px 0;
  }

  .doc-table th,
  .doc-table td {
    border-bottom: 0;
    padding: 5px 14px;
  }

  .doc-table td::before {
    content: attr(data-label) '：';
    color: var(--text-muted);
    font-weight: 600;
  }
}

.doc-pre {
  margin: 14px 0;
  padding: 16px;
  border-radius: 12px;
  background: #070b16;
  border: 1px solid var(--border);
  overflow: auto;
  font-size: 12.5px;
  line-height: 1.6;
}

.doc-pre code {
  background: transparent;
  padding: 0;
  color: var(--text-secondary);
  white-space: pre;
  word-break: normal;
}

.doc-pre-notices {
  max-height: 620px;
}

.notice-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}

.notice-stat {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(19, 29, 54, 0.8);
  border: 1px solid var(--border);
}

.notice-stat strong {
  display: block;
  font-size: 18px;
  color: var(--emerald);
}

.notice-stat span {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ky-mail-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: var(--emerald);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  vertical-align: baseline;
}

.ky-mail-btn:hover {
  background: rgba(52, 211, 153, 0.22);
}

.ky-mail-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ky-mail-revealed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  vertical-align: baseline;
}

.ky-mail-text {
  background: rgba(52, 211, 153, 0.14) !important;
  color: #a7f3d0 !important;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.ky-mail-copy {
  padding: 1px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.ky-mail-copy:hover {
  border-color: var(--emerald);
}

.ky-mail-wx {
  font-size: 12.5px;
  color: var(--text-muted);
}

.doc-contact-strip {
  margin-top: 24px;
  padding: 18px 22px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-secondary);
}

.doc-source-note {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.doc-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 32px;
  color: var(--text-muted);
  font-size: 13px;
}

.doc-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.doc-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.doc-footer a:hover {
  color: var(--text);
}

.doc-records {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
