: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,
.hero-shell,
.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,
.doc-label,
.toc-title,
.footer-brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.brand-mark,
.doc-label img,
.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,
.hero-doc-title,
.chip-row span {
  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;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 38px;
  padding: 46px;
  border-radius: 30px;
  overflow: hidden;
}

.hero-kicker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

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

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

.hero-doc-title {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  padding: 9px 18px;
  color: var(--gold);
  border-color: rgba(255, 200, 87, 0.3);
  background: rgba(255, 200, 87, 0.08);
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.hero-headline {
  display: grid;
  gap: 4px;
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  word-break: keep-all;
}

.hero-headline span {
  display: block;
  white-space: nowrap;
}

.hero-shell p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.82;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.chip-row span {
  padding: 8px 13px;
  color: var(--cyan);
}

.ai-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: center;
}

.metric-tile {
  min-height: 132px;
  padding: 22px;
  border: 1px solid rgba(54, 231, 255, 0.2);
  border-radius: 20px;
  background: rgba(5, 15, 24, 0.72);
}

.metric-tile span {
  display: block;
  color: var(--faint);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.metric-tile strong {
  display: block;
  margin-top: 12px;
  color: var(--green);
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.1;
}

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

.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);
}

.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 {
  margin: 20px 0 28px;
  border: 1px solid rgba(54, 231, 255, 0.18);
  border-radius: 16px;
  background: rgba(4, 12, 20, 0.72);
  overflow: auto;
}

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);
}

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);
}

.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) {
  .site-header,
  .hero-shell,
  .reading-layout,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-header {
    border-radius: 26px;
  }

  .doc-badge,
  .contact-link {
    justify-self: stretch;
    text-align: center;
  }

  .hero-shell {
    padding: 38px;
  }

  .ai-dashboard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metric-tile {
    min-height: 118px;
  }

  .toc-panel {
    position: relative;
    top: auto;
    max-height: none;
  }

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

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

  .site-header {
    top: 8px;
    margin-top: 8px;
    padding: 10px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .hero-kicker-row {
    gap: 10px;
    margin-bottom: 20px;
  }

  .hero-doc-title {
    padding: 8px 13px;
    font-size: 14px;
  }

  .hero-headline {
    gap: 2px;
    font-size: clamp(42px, 13vw, 56px);
    line-height: 1;
  }

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

  .ai-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-tile {
    min-height: 104px;
    padding: 18px;
  }

  .metric-tile strong {
    font-size: clamp(24px, 9vw, 34px);
  }

  .toc-panel nav {
    grid-template-columns: 1fr;
  }

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

  table {
    min-width: 640px;
  }
}

@media (max-width: 420px) {
  .hero-headline {
    font-size: clamp(36px, 12.5vw, 48px);
  }

  .doc-label span {
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  .ai-dashboard {
    grid-template-columns: 1fr;
  }

  .chip-row span {
    width: 100%;
    text-align: center;
  }
}
