:root {
  --bg: #06101a;
  --bg-deep: #03070d;
  --panel: #0b1824;
  --panel-2: #0e2231;
  --paper: #0a1520;
  --line: rgba(73, 213, 238, 0.18);
  --line-2: rgba(255, 255, 255, 0.08);
  --text: #eef8ff;
  --muted: rgba(224, 239, 248, 0.72);
  --faint: rgba(224, 239, 248, 0.48);
  --cyan: #36e7ff;
  --green: #61f7b3;
  --gold: #ffc857;
  --blue: #4c8dff;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
  --radius: 24px;
  --font: "Alibaba PuHuiTi", "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 12% 0%, rgba(54, 231, 255, 0.14), transparent 30vw),
    radial-gradient(circle at 88% 8%, rgba(97, 247, 179, 0.1), transparent 28vw),
    linear-gradient(145deg, var(--bg-deep), var(--bg) 44%, #04131a);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(54, 231, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 231, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.48), transparent);
}

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

.site-header,
.toc-panel,
.doc-body,
.site-footer {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(54, 231, 255, 0.07), rgba(97, 247, 179, 0.025)),
    rgba(7, 18, 29, 0.92);
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(150px, 1fr);
  gap: 18px;
  align-items: center;
  width: min(1220px, calc(100% - 40px));
  margin: 14px auto 0;
  padding: 10px 12px;
  border-radius: 999px;
}

.brand,
.toc-title,
.footer-brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.brand-mark,
.toc-title img,
.footer-brand img {
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid rgba(54, 231, 255, 0.28);
  border-radius: 50%;
  background: rgba(54, 231, 255, 0.08);
  object-fit: contain;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy strong,
.brand-copy small {
  display: block;
  white-space: nowrap;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.doc-badge,
.contact-link {
  border: 1px solid rgba(54, 231, 255, 0.24);
  border-radius: 999px;
  background: rgba(54, 231, 255, 0.07);
}

.doc-badge {
  justify-self: center;
  padding: 10px 18px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.contact-link {
  justify-self: end;
  padding: 10px 18px;
  color: var(--gold);
  border-color: rgba(255, 200, 87, 0.3);
  background: rgba(255, 200, 87, 0.08);
}

main {
  width: min(1220px, calc(100% - 40px));
  margin: 22px auto 0;
}

.toc-title img {
  width: 34px;
  height: 34px;
  padding: 7px;
}

.toc-title span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.reading-layout {
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 0;
}

.reading-layout > *,
.toc-panel,
.doc-body,
.site-footer {
  min-width: 0;
}

.toc-panel {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 124px);
  padding: 20px;
  border-radius: var(--radius);
  overflow: auto;
}

.toc-title {
  margin-bottom: 16px;
}

.toc-panel nav {
  display: grid;
  gap: 7px;
}

.toc-panel a {
  display: block;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.toc-panel a:hover {
  border-color: rgba(54, 231, 255, 0.24);
  color: var(--cyan);
  background: rgba(54, 231, 255, 0.06);
}

.doc-body {
  padding: 48px min(5vw, 70px);
  border-radius: var(--radius);
  color: var(--text);
  max-width: 100%;
  overflow-wrap: anywhere;
}

.doc-body h1,
.doc-body h2,
.doc-body h3,
.doc-body h4 {
  color: var(--text);
  scroll-margin-top: 114px;
}

.doc-body h1 {
  margin: 0 0 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(30px, 3.8vw, 52px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.doc-body h2 {
  margin: 52px 0 20px;
  padding: 16px 18px;
  border: 1px solid rgba(54, 231, 255, 0.18);
  border-left: 5px solid var(--cyan);
  border-radius: 16px;
  background: rgba(54, 231, 255, 0.06);
  font-size: clamp(24px, 2.7vw, 34px);
  line-height: 1.28;
}

.doc-body h3 {
  margin: 32px 0 14px;
  color: var(--cyan);
  font-size: 22px;
  line-height: 1.35;
}

.doc-body h4 {
  margin: 24px 0 12px;
  color: var(--green);
  font-size: 18px;
}

.doc-body p,
.doc-body li,
td {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.86;
}

.doc-body p {
  margin: 0 0 16px;
}

.doc-body strong {
  color: #fff;
  font-weight: 800;
}

.doc-body a {
  color: var(--cyan);
  border-bottom: 1px solid rgba(54, 231, 255, 0.28);
}

.doc-body ul,
.doc-body ol {
  margin: 12px 0 22px;
  padding-left: 24px;
}

.doc-body li + li {
  margin-top: 6px;
}

.doc-body blockquote {
  margin: 22px 0;
  padding: 18px 22px;
  border: 1px solid rgba(255, 200, 87, 0.22);
  border-left: 5px solid var(--gold);
  border-radius: 16px;
  background: rgba(255, 200, 87, 0.075);
}

.doc-body blockquote p {
  color: rgba(255, 239, 202, 0.88);
}

.doc-body hr {
  height: 1px;
  margin: 32px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(54, 231, 255, 0.32), transparent);
}

.doc-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.diagram-card,
.flow-card,
.example-card {
  position: relative;
  margin: 20px 0 28px;
  padding: 22px 24px;
  border: 1px solid rgba(54, 231, 255, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(54, 231, 255, 0.09), rgba(97, 247, 179, 0.04)),
    rgba(3, 12, 20, 0.78);
  overflow: hidden;
}

.diagram-card::before,
.flow-card::before,
.example-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  content: "";
  background: linear-gradient(180deg, var(--cyan), var(--green));
}

.diagram-card strong,
.flow-card strong,
.example-card strong {
  display: block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 18px;
  line-height: 1.5;
}

.diagram-card p,
.flow-card p,
.example-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.78;
}

.flow-card p + p,
.example-card p + p {
  padding-top: 8px;
  border-top: 1px solid var(--line-2);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 20px 0 28px;
  border: 1px solid rgba(54, 231, 255, 0.18);
  border-radius: 16px;
  background: rgba(4, 12, 20, 0.72);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

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

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

th {
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: 0.06em;
  background: rgba(54, 231, 255, 0.08);
}

td[data-label="姓名"],
td[data-label="成员"] {
  min-width: 88px;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

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

.star-mark {
  color: var(--gold);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: min(1220px, calc(100% - 40px));
  margin: 20px auto 36px;
  padding: 34px;
  border-radius: var(--radius);
}

.footer-brand img {
  width: 46px;
  height: 46px;
}

.footer-brand span,
.footer-brand strong {
  display: block;
}

.footer-brand span {
  color: var(--faint);
}

.footer-brand strong {
  margin-top: 5px;
  font-size: 22px;
}

.footer-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.footer-info p > span {
  display: block;
  margin-top: 4px;
}

.footer-info a {
  color: var(--cyan);
  overflow-wrap: anywhere;
}

.footer-info .mail-separator {
  display: inline;
  margin: 0 6px;
  color: var(--faint);
}

.legal-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  color: var(--faint);
  line-height: 1.72;
}

@media (max-width: 1080px) {
  .reading-layout,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-header {
    width: min(100% - 32px, 1220px);
    grid-template-columns: minmax(210px, 1fr) auto auto;
    border-radius: 999px;
  }

  .toc-panel {
    position: relative;
    top: auto;
    max-height: 360px;
    padding: 18px;
  }

  .toc-panel nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-body {
    padding: 38px;
  }
}

@media (max-width: 900px) {
  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .table-wrap tr {
    padding: 14px;
    border: 1px solid rgba(54, 231, 255, 0.18);
    border-radius: 15px;
    background:
      linear-gradient(135deg, rgba(54, 231, 255, 0.07), rgba(97, 247, 179, 0.025)),
      rgba(4, 12, 20, 0.78);
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-2);
    font-size: 14px;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--cyan);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .table-wrap td:first-child {
    display: block;
    padding-top: 0;
    color: #fff;
    font-weight: 800;
  }

  .table-wrap td:first-child::before,
  .table-wrap td[data-label=""]::before {
    content: none;
  }

  .table-wrap td[data-label=""] {
    grid-template-columns: 1fr;
  }

  .table-wrap td:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 24px, 1220px);
  }

  .site-header {
    top: 8px;
    margin-top: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 9px;
    gap: 8px;
    border-radius: 22px;
  }

  .brand {
    grid-column: 1 / -1;
    justify-content: center;
    min-width: 0;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 13px;
    white-space: normal;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    padding: 7px;
  }

  .doc-badge,
  .contact-link {
    justify-self: stretch;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.25;
    text-align: center;
  }

  .toc-panel,
  .doc-body,
  .site-footer {
    padding: 24px;
    border-radius: 22px;
  }

  .doc-body p,
  .doc-body li,
  td {
    font-size: 15px;
    line-height: 1.78;
  }

  .toc-panel {
    max-height: none;
    overflow: hidden;
  }

  .toc-panel nav {
    display: grid;
    grid-template-columns: 1fr;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
  }

  .toc-panel a {
    font-size: 13px;
    line-height: 1.5;
  }

  .doc-body h1 {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.22;
  }

  .doc-body h2 {
    margin-top: 38px;
    font-size: clamp(22px, 6vw, 28px);
  }

  .doc-body h2 {
    padding: 14px 16px;
  }

  .doc-body h3 {
    font-size: 19px;
  }

  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .table-wrap tr {
    padding: 14px;
    border: 1px solid rgba(54, 231, 255, 0.18);
    border-radius: 15px;
    background:
      linear-gradient(135deg, rgba(54, 231, 255, 0.07), rgba(97, 247, 179, 0.025)),
      rgba(4, 12, 20, 0.78);
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid var(--line-2);
    font-size: 14px;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--cyan);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .table-wrap td:first-child {
    display: block;
    padding-top: 0;
    color: #fff;
    font-weight: 800;
  }

  .table-wrap td:first-child::before,
  .table-wrap td[data-label=""]::before {
    content: none;
  }

  .table-wrap td[data-label=""] {
    grid-template-columns: 1fr;
  }

  .table-wrap td:last-child {
    border-bottom: 0;
  }

  .diagram-card,
  .flow-card,
  .example-card {
    padding: 18px;
  }

  .site-footer {
    margin-bottom: 24px;
  }
}

@media (max-width: 420px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 16px, 1220px);
  }

  .brand {
    min-width: 0;
  }

  .brand-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .toc-panel,
  .doc-body,
  .site-footer {
    padding: 16px;
    border-radius: 17px;
  }

  .toc-title span {
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .doc-body h1 {
    font-size: 25px;
    letter-spacing: -0.03em;
  }

  .doc-body h2 {
    margin-top: 34px;
    padding: 12px 13px;
    font-size: 21px;
  }

  .doc-body p,
  .doc-body li,
  td {
    font-size: 14px;
  }

  .doc-body ul,
  .doc-body ol {
    padding-left: 20px;
  }

  .table-wrap {
    margin-right: 0;
    margin-left: 0;
    border-radius: 14px;
  }

  .table-wrap tr {
    padding: 13px;
  }

  .table-wrap td {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 9px 0;
  }

  .diagram-card,
  .flow-card,
  .example-card {
    padding: 16px;
    border-radius: 15px;
  }

  .diagram-card strong,
  .flow-card strong,
  .example-card strong {
    font-size: 16px;
  }

  .footer-brand strong {
    font-size: 19px;
  }
}
