:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #f5f8f8;
  --ink: #15252c;
  --muted: #50636a;
  --accent: #087359;
  --accent-hover: #065944;
  --accent-soft: #e5f4ed;
  --accent-border: #a5c9bd;
  --line: #d5e1e0;
  --trace: #7ea89e;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-family:
    Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
  background: var(--background);
  color: var(--ink);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body,
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}
code {
  font-family: var(--mono);
}
img {
  display: block;
  width: 100%;
  height: auto;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.wrap {
  width: min(100% - 4rem, 76rem);
  margin-inline: auto;
}
.section {
  padding-block: clamp(4.25rem, 8vw, 7.25rem);
  scroll-margin-top: 4.5rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.625rem 1rem;
  background: var(--accent);
  color: var(--background);
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 5;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}
.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.header-inner {
  min-height: 4.5rem;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.brand > span:last-child {
  margin-left: -0.42rem;
  color: var(--accent);
}
.mark {
  position: relative;
  display: inline-block;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--accent);
}
.mark::before,
.mark::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 0.2rem;
}
.mark::before {
  top: 0;
  left: 0;
}
.mark::after {
  bottom: 0;
  right: 0;
}
.header-inner nav,
.header-links {
  display: flex;
  align-items: center;
  gap: clamp(0.875rem, 2.4vw, 2rem);
}
.header-inner nav a,
.header-links a,
.footer-inner > a:not(.brand) {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}
.header-inner nav a:hover,
.header-links a:hover,
.footer-inner > a:hover {
  color: var(--accent);
}
.header-links .header-github {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--ink);
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 88% 18%, #e2f2ec, transparent 64%),
    var(--background);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.99fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
  padding-block: clamp(4.5rem, 8.8vw, 8.25rem);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow > span {
  width: 1rem;
  height: 2px;
  background: currentColor;
}
h1,
h2 {
  line-height: 1.08;
  letter-spacing: -0.052em;
  text-wrap: balance;
}
h1 {
  margin-block: 1.125rem 1.5rem;
  font-size: clamp(2.85rem, 5.4vw, 5.35rem);
  font-weight: 730;
}
h1 em {
  color: var(--accent);
  font-style: normal;
}
h2 {
  margin-block: 0.875rem 1.125rem;
  font-size: clamp(2.15rem, 3.6vw, 3.65rem);
  font-weight: 715;
}
:lang(zh-CN) h1,
:lang(zh-CN) h2 {
  letter-spacing: -0.035em;
}
.hero-description {
  max-width: 32rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 0.45rem;
  border: 1px solid transparent;
  font-weight: 690;
  font-size: 0.94rem;
  transition:
    background 0.18s,
    border-color 0.18s;
}
.primary {
  background: var(--accent);
  color: var(--background);
}
.primary:hover {
  background: var(--accent-hover);
}
.secondary {
  background: var(--background);
  border-color: var(--line);
}
.secondary:hover {
  border-color: var(--accent);
}

.architecture {
  border-bottom: 1px solid var(--line);
}
.architecture-diagram {
  overflow-x: auto;
  border-radius: 0.875rem;
}
.architecture-diagram img {
  min-width: 49rem;
}
.architecture figcaption {
  margin-top: 1rem;
}

.node-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  color: var(--accent);
}
.node-icon::before,
.node-icon::after {
  content: "";
  display: block;
}
.pulse-icon::before {
  width: 1.15rem;
  height: 0.9rem;
  background: currentColor;
  clip-path: polygon(
    0 47%,
    25% 47%,
    42% 0,
    61% 76%,
    74% 47%,
    100% 47%,
    100% 57%,
    80% 57%,
    59% 100%,
    40% 29%,
    31% 57%,
    0 57%
  );
}
.service-icon::before {
  width: 0.95rem;
  height: 0.5rem;
  border-block: 1px solid currentColor;
}
.service-icon::after {
  position: absolute;
  width: 0.6rem;
  height: 0.85rem;
  border: 1px solid currentColor;
  border-width: 0 1px;
  transform: skew(-34deg);
}
.target-icon::before,
.target-icon::after {
  position: absolute;
  width: 0.95rem;
  height: 0.95rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.target-icon::after {
  width: 0.42rem;
  height: 0.42rem;
}

.section-intro {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 2rem;
}
.section-intro h2 {
  margin-bottom: 0;
}
.section-intro > p {
  max-width: 25rem;
  color: var(--muted);
}
.primitives {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.primitives article {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: start;
  padding: clamp(1.125rem, 2.4vw, 1.875rem);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
}
.primitive-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.4rem;
  background: var(--accent-soft);
}
.primitives h3 {
  margin-block: 0.875rem 0.25rem;
  font-size: 1.275rem;
}
.primitives p {
  color: var(--muted);
}
.primitives code {
  margin-top: 1.25rem;
  border-radius: 0.3rem;
  padding: 0.21rem 0.5rem;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.8rem;
}
.text-link {
  display: inline-block;
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--trace);
  text-underline-offset: 0.27em;
}
.text-link:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.getting-started {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.start-layout,
.console-layout,
.resources-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2.25rem, 6vw, 6.25rem);
  align-items: center;
}
.section-description {
  color: var(--muted);
  max-width: 33rem;
}
.section-description + .text-link {
  margin-top: 1.3rem;
}
.install {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--background);
}
.sdk-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.65rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0.7rem 0.7rem 0 0;
}
.sdk-tabs button,
.copy {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--muted);
  padding: 0.35rem 0.6rem;
  font-size: 0.88rem;
  font-weight: 630;
}
.sdk-tabs button:hover,
.copy:hover {
  color: var(--ink);
}
.sdk-tabs button[aria-selected="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}
.sdk-panel {
  padding: 1rem 1.125rem;
}
.sdk-panel + .sdk-panel {
  border-top: 1px solid var(--line);
}
.sdk-panel[hidden] + .sdk-panel {
  border-top: 0;
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 1.9rem;
  color: var(--muted);
  font: 0.8125rem var(--mono);
}
.copy {
  border-color: var(--line);
}
.sdk-panel pre {
  display: flex;
  align-items: flex-start;
  min-height: 8.25rem;
  margin: 0.8rem 0 1rem;
  padding: 0.75rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.875rem;
  tab-size: 2;
}

.section-console {
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 95% 45%, #ebf5f1, transparent 66%);
}
.console-items {
  list-style: none;
  display: grid;
  gap: 1rem;
  padding: 0;
  margin-block: 1.75rem;
}
.console-items li {
  padding-left: 1rem;
  border-left: 2px solid var(--trace);
}
.console-items li span {
  font-weight: 650;
}
.console-items p {
  color: var(--muted);
}
.console-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--background);
  box-shadow: 0 1.5rem 3.75rem #163d3326;
}
.console-demo video {
  display: block;
  width: 100%;
  height: auto;
  background: var(--ink);
}
.console-demo figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.375rem 1rem;
  margin-top: 1rem;
  color: var(--muted);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding-inline: 0.875rem;
  background: var(--surface);
}
.window-bar > span {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #849b9a;
}
.window-bar code {
  margin-inline: auto;
  font-size: 0.75rem;
  color: var(--muted);
}

.resources {
  background: var(--surface);
}
.resources-layout {
  align-items: start;
}
.resource-list {
  border-top: 1px solid var(--line);
}
.resource-list a {
  display: grid;
  gap: 0.2rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.resource-list strong {
  font-weight: 650;
}
.resource-list span {
  color: var(--muted);
}
.resource-list a:hover strong {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.site-footer {
  border-top: 1px solid var(--line);
}
.footer-inner {
  flex-wrap: wrap;
  padding-block: 1.625rem;
}
.footer-inner .brand {
  margin-right: auto;
}

@media (max-width: 55rem) {
  .wrap {
    width: min(100% - 3rem, 44rem);
  }
  .hero-inner,
  .start-layout,
  .console-layout,
  .resources-layout {
    grid-template-columns: 1fr;
  }
  .hero-inner {
    gap: 2.75rem;
  }
  .hero-copy {
    max-width: 35rem;
  }
  h1 {
    font-size: clamp(3rem, 8.75vw, 5rem);
  }
  .primitives {
    gap: 0.75rem;
  }
  .section-intro {
    display: block;
  }
  .section-intro > p {
    margin-top: 1rem;
  }
}

@media (max-width: 40rem) {
  .wrap {
    width: calc(100% - 2rem);
  }
  .header-inner {
    min-height: 3.75rem;
    flex-wrap: wrap;
    gap: 0.375rem 0.75rem;
    padding-block: 0.625rem;
  }
  .header-inner nav {
    order: 1;
    flex-basis: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 0.375rem;
    padding-block: 0.125rem;
  }
  .header-inner nav a,
  .header-links a {
    padding-block: 0.2rem;
  }
  .header-links .header-github {
    padding-block: 0.15rem;
  }
  .section {
    scroll-margin-top: 6rem;
  }
  .hero-inner {
    padding-block: 3.25rem 3.5rem;
  }
  .hero-actions {
    margin-top: 1.5rem;
  }
  .primitives {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    gap: 0.75rem 1rem;
  }
  .footer-inner .brand {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
