:root {
  color-scheme: light;
  --ink: #151719;
  --ink-soft: #30353a;
  --muted: #68717b;
  --paper: #f6f7f9;
  --surface: #ffffff;
  --line: #dfe3e8;
  --line-dark: rgba(255, 255, 255, 0.18);
  --green: #0f766e;
  --green-bright: #2dd4bf;
  --blue: #2563eb;
  --amber: #b45309;
  --rose: #be123c;
  --shadow: 0 18px 60px rgba(21, 23, 25, 0.12);
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

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

code {
  color: #0b5f59;
  font-size: 0.96em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 44px;
  background: rgba(21, 23, 25, 0.92);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(45, 212, 191, 0.58);
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.1);
  color: var(--green-bright);
  font-size: 15px;
}

.brand-text {
  font-size: 18px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.nav-links a,
.nav-action {
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.nav-links a:hover,
.nav-action:hover {
  color: #fff;
}

.nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
}

.hero {
  position: relative;
  min-height: 82svh;
  overflow: hidden;
  background: #151719;
  color: #fff;
}

.hero-canvas,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-canvas {
  opacity: 0.92;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(21, 23, 25, 0.96), rgba(21, 23, 25, 0.76) 48%, rgba(21, 23, 25, 0.44)),
    radial-gradient(circle at 76% 30%, rgba(15, 118, 110, 0.24), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 88px 0 74px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--green-bright);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: 64px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.hero-copy {
  max-width: 760px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.75;
}

.hero-copy code,
.command-panel code {
  color: #7dd3fc;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  max-width: 100%;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 720;
  line-height: 1.2;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: #f7fbfb;
  color: var(--ink);
  border-color: #f7fbfb;
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.button-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.button-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  top: -6px;
  right: -6px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: inherit;
}

.command-panel {
  width: min(760px, 100%);
  margin-top: 28px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(10, 12, 14, 0.54);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.command-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-dark);
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #f8fafc;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
}

.status-pill[data-state="online"]::before {
  background: var(--green-bright);
}

.status-pill[data-state="offline"]::before {
  background: var(--rose);
}

.command-panel pre {
  margin: 0;
  padding: 20px 16px;
  overflow-x: auto;
  color: #e9f7f6;
  font-size: 15px;
  line-height: 1.6;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.quick-grid article {
  min-height: 168px;
  padding: 30px 34px;
  background: var(--surface);
}

.metric {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--amber);
  font-weight: 800;
}

.quick-grid h2 {
  font-size: 22px;
  line-height: 1.25;
}

.quick-grid p,
.section-heading p,
.flow-rail p,
.api-list p,
.security-grid p,
.site-footer {
  color: var(--muted);
  line-height: 1.72;
}

.quick-grid p {
  margin-top: 10px;
  font-size: 15px;
}

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

.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.section-heading.compact {
  margin-bottom: 0;
}

.section-heading h2 {
  font-size: 40px;
  line-height: 1.16;
  letter-spacing: 0;
}

.section-heading p {
  margin-top: 18px;
  font-size: 17px;
}

.flow-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 14px 44px rgba(21, 23, 25, 0.08);
}

.flow-rail article {
  position: relative;
  min-height: 222px;
  padding: 26px 22px;
  border-right: 1px solid var(--line);
}

.flow-rail article:last-child {
  border-right: 0;
}

.flow-rail article::after {
  content: "";
  position: absolute;
  top: 44px;
  right: -7px;
  z-index: 1;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--surface);
  transform: rotate(45deg);
}

.flow-rail article:last-child::after {
  display: none;
}

.flow-rail span {
  display: inline-flex;
  margin-bottom: 44px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.flow-rail strong {
  display: block;
  font-size: 20px;
  line-height: 1.3;
}

.flow-rail p {
  margin-top: 12px;
  font-size: 14px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 48px;
  align-items: start;
  border-top: 1px solid var(--line);
}

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

.api-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.api-list code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.api-list p {
  grid-column: 2;
  font-size: 14px;
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 30px;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 820;
}

.method.get {
  background: var(--green);
}

.method.post {
  background: var(--blue);
}

.security-band {
  width: 100%;
  max-width: none;
  padding: 96px max(24px, calc((100% - 1180px) / 2));
  background: #151719;
  color: #fff;
}

.security-band .section-heading p,
.security-grid p {
  color: rgba(255, 255, 255, 0.7);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.security-grid article {
  min-height: 190px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.security-grid h3 {
  font-size: 19px;
  line-height: 1.3;
}

.security-grid p {
  margin-top: 14px;
  font-size: 14px;
}

.security-grid code {
  color: #7dd3fc;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  padding: 30px 44px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
}

.site-footer a {
  color: var(--green);
  font-weight: 740;
}

.plain-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #151719;
  color: #fff;
}

.not-found {
  width: min(540px, calc(100% - 48px));
}

.not-found h1 {
  font-size: 48px;
}

.not-found p:not(.eyebrow) {
  margin: 18px 0 28px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.75;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: auto auto;
    padding: 0 24px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 84svh;
  }

  h1 {
    font-size: 52px;
  }

  .hero-copy {
    font-size: 18px;
  }

  .quick-grid,
  .flow-rail,
  .security-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .flow-rail article {
    min-height: 178px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .flow-rail article:last-child {
    border-bottom: 0;
  }

  .flow-rail article::after {
    top: auto;
    right: 34px;
    bottom: -7px;
    transform: rotate(135deg);
  }

  .section-heading.compact {
    margin-bottom: 28px;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 64px;
    gap: 12px;
    padding: 0 16px;
  }

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

  .brand-text {
    font-size: 16px;
  }

  .nav-action {
    min-height: 34px;
    padding: 0 12px;
  }

  .hero-content,
  .section {
    width: min(100% - 32px, 1180px);
  }

  .hero-content {
    padding: 64px 0 54px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-copy {
    font-size: 16px;
    line-height: 1.68;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(21, 23, 25, 0.97), rgba(21, 23, 25, 0.78)),
      radial-gradient(circle at 90% 20%, rgba(15, 118, 110, 0.18), transparent 44%);
  }

  .button {
    width: 100%;
  }

  .command-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-grid article {
    min-height: 144px;
    padding: 24px 20px;
  }

  .section {
    padding: 68px 0;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .section-heading p {
    font-size: 16px;
  }

  .api-list article {
    grid-template-columns: 1fr;
  }

  .api-list p {
    grid-column: 1;
  }

  .security-band {
    padding: 72px 16px;
  }

  .site-footer {
    padding: 26px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
