:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5c6974;
  --line: #d9e1e8;
  --surface: #ffffff;
  --soft: #f4f7f9;
  --teal: #087f8c;
  --teal-dark: #075f68;
  --amber: #b9770e;
  --red: #b33a3a;
  --blue: #2f5f9f;
  --shadow: 0 16px 42px rgba(23, 32, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f7f9fb;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 225, 232, 0.88);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(8, 127, 140, 0.32);
  border-radius: 8px;
  background: #e9f7f8;
  color: var(--teal-dark);
  font-size: 14px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #41505b;
  font-size: 14px;
  white-space: nowrap;
}

.nav a {
  border-radius: 6px;
  padding: 8px 10px;
}

.nav a:hover,
.nav a:focus-visible {
  background: #eef4f6;
  outline: none;
}

.nav .nav-strong {
  background: var(--ink);
  color: #ffffff;
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(247, 249, 251, 0.96), rgba(247, 249, 251, 0.68)),
    url("./gateway-panel.svg") center right / min(720px, 62vw) no-repeat,
    #f7f9fb;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  gap: 44px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  min-height: min(720px, calc(100vh - 86px));
  margin: 0 auto;
  padding: 72px 0 56px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(8, 127, 140, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 6px 10px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 720;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

.hero h1 {
  max-width: 760px;
  margin-top: 22px;
  font-size: 54px;
  font-weight: 780;
}

.lead {
  max-width: 710px;
  margin: 22px 0 0;
  color: #42515d;
  font-size: 18px;
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 15px;
  font-weight: 720;
}

.button.primary {
  background: var(--teal);
  color: #ffffff;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--teal-dark);
  outline: none;
}

.button.secondary {
  border-color: #cbd7df;
  background: rgba(255, 255, 255, 0.82);
  color: #24313a;
}

.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: #9eb3c2;
  background: #ffffff;
  outline: none;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 650px;
  margin-top: 34px;
}

.metric {
  border: 1px solid rgba(217, 225, 232, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 20px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.system-panel {
  align-self: stretch;
  border: 1px solid rgba(203, 215, 223, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  color: #44535f;
  font-size: 13px;
  font-weight: 720;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #19a15f;
}

.routes {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.route-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 84px;
  gap: 10px;
  align-items: center;
  border: 1px solid #dce5ea;
  border-radius: 7px;
  background: #fbfcfd;
  padding: 11px;
  font-size: 13px;
}

.route-row code {
  color: var(--blue);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.route-label {
  color: #53616d;
}

.tag {
  justify-self: end;
  border-radius: 999px;
  background: #eaf6f7;
  padding: 4px 8px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 720;
}

.tag.proxy {
  background: #f3eee6;
  color: #7a4f0a;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0;
}

.section.compact {
  padding-top: 44px;
}

.section-head {
  display: grid;
  max-width: 760px;
  gap: 12px;
  margin-bottom: 28px;
}

.section h2 {
  font-size: 34px;
}

.section-head p,
.muted {
  margin: 0;
  color: var(--muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature,
.doc-card,
.callout,
.endpoint,
.code-panel,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.feature,
.doc-card,
.callout,
.notice {
  padding: 20px;
}

.feature h3,
.doc-card h3,
.callout h3,
.endpoint h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.feature p,
.doc-card p,
.callout p,
.endpoint p,
.notice p {
  margin: 0;
  color: var(--muted);
}

.feature-kicker {
  display: inline-block;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #eef4f6;
  padding: 4px 8px;
  color: #40515e;
  font-size: 12px;
  font-weight: 720;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 24px;
  align-items: start;
}

.code-panel {
  overflow: hidden;
}

.code-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  background: #f9fbfc;
  color: #465661;
  font-size: 13px;
  font-weight: 720;
}

pre {
  margin: 0;
  overflow-x: auto;
  padding: 18px;
  background: #111a20;
  color: #edf7f8;
  font-size: 13px;
  line-height: 1.6;
}

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

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.endpoint-list {
  display: grid;
  gap: 14px;
}

.endpoint {
  padding: 0;
  overflow: hidden;
}

.endpoint h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.method {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  border-radius: 6px;
  background: #e8f5ef;
  padding: 4px 8px;
  color: #12643c;
  font-size: 12px;
}

.endpoint-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0;
  color: #687680;
  font-size: 14px;
}

.doc-hero {
  border-bottom: 1px solid var(--line);
  background: #eef4f6;
}

.doc-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 62px 0;
}

.doc-hero h1 {
  max-width: 800px;
  margin-top: 14px;
  font-size: 46px;
}

.doc-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #43535f;
  font-size: 18px;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.toc a {
  border: 1px solid #cbd7df;
  border-radius: 999px;
  background: #ffffff;
  padding: 7px 11px;
  color: #31404a;
  font-size: 14px;
}

.notice {
  border-left: 4px solid var(--amber);
}

@media (max-width: 900px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero {
    background:
      linear-gradient(0deg, rgba(247, 249, 251, 0.95), rgba(247, 249, 251, 0.82)),
      url("./gateway-panel.svg") center bottom / 720px no-repeat,
      #f7f9fb;
  }

  .hero-inner,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
    padding-top: 48px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .doc-hero h1 {
    font-size: 36px;
  }

  .system-panel {
    align-self: auto;
  }

  .feature-grid,
  .doc-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .route-row {
    grid-template-columns: 1fr;
  }

  .tag {
    justify-self: start;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
