:root {
  color-scheme: dark;
  --bg: #000000;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.58);
  --faint: rgba(255, 255, 255, 0.46);
  --border: rgba(255, 255, 255, 0.1);
  --panel: rgba(255, 255, 255, 0.04);
  --panel-card: rgba(255, 255, 255, 0.035);
  --header-bg: rgba(0, 0, 0, 0.92);
  --overlay-bg: rgba(0, 0, 0, 0.98);
  --hover-bg: rgba(255, 255, 255, 0.08);
  --secondary-border: rgba(255, 255, 255, 0.18);
  --secondary-bg: rgba(255, 255, 255, 0.04);
  --secondary-hover-border: rgba(255, 255, 255, 0.32);
  --secondary-hover-bg: rgba(255, 255, 255, 0.07);
  --terminal-bg: rgba(0, 0, 0, 0.7);
  --step-bg: rgba(0, 0, 0, 0.45);
  --body-copy: rgba(255, 255, 255, 0.68);
  --card-body: rgba(255, 255, 255, 0.62);
  --tag-text: rgba(255, 255, 255, 0.56);
  --tile-detail: rgba(255, 255, 255, 0.52);
  --code-text: rgba(255, 255, 255, 0.76);
  --footer-text: rgba(255, 255, 255, 0.42);
  --footer-hover: rgba(255, 255, 255, 0.72);
  --status-border: rgba(255, 255, 255, 0.12);
  --status-bg: rgba(255, 255, 255, 0.04);
  --top-line-color: rgba(255, 255, 255, 0.3);
  --grid-line-a: rgba(150, 170, 210, 0.055);
  --grid-line-b: rgba(150, 170, 210, 0.045);
  --glow-top: rgba(255, 255, 255, 0.06);
  --glow-bottom: rgba(255, 255, 255, 0.04);
  --scanline: rgba(255, 255, 255, 0.025);
  --shadow: rgba(0, 0, 0, 0.4);
  --card-border-hover: rgba(255, 255, 255, 0.2);
  --compat-border: rgba(110, 231, 183, 0.25);
  --btn-primary-bg: #ffffff;
  --btn-primary-text: #000000;
  --emerald: #6ee7b7;
  --cyan: #a5f3fc;
  --max: 1152px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8fb;
  --text: #0f172a;
  --muted: rgba(15, 23, 42, 0.62);
  --faint: rgba(15, 23, 42, 0.48);
  --border: rgba(15, 23, 42, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --panel-card: rgba(255, 255, 255, 0.86);
  --header-bg: rgba(255, 255, 255, 0.9);
  --overlay-bg: rgba(255, 255, 255, 0.98);
  --hover-bg: rgba(15, 23, 42, 0.06);
  --secondary-border: rgba(15, 23, 42, 0.18);
  --secondary-bg: rgba(255, 255, 255, 0.7);
  --secondary-hover-border: rgba(15, 23, 42, 0.32);
  --secondary-hover-bg: rgba(255, 255, 255, 0.96);
  --terminal-bg: rgba(255, 255, 255, 0.88);
  --step-bg: rgba(255, 255, 255, 0.86);
  --body-copy: rgba(15, 23, 42, 0.72);
  --card-body: rgba(15, 23, 42, 0.66);
  --tag-text: rgba(15, 23, 42, 0.58);
  --tile-detail: rgba(15, 23, 42, 0.56);
  --code-text: rgba(15, 23, 42, 0.78);
  --footer-text: rgba(15, 23, 42, 0.46);
  --footer-hover: rgba(15, 23, 42, 0.76);
  --status-border: rgba(15, 23, 42, 0.12);
  --status-bg: rgba(255, 255, 255, 0.78);
  --top-line-color: rgba(15, 23, 42, 0.2);
  --grid-line-a: rgba(15, 23, 42, 0.055);
  --grid-line-b: rgba(15, 23, 42, 0.045);
  --glow-top: rgba(255, 255, 255, 0.85);
  --glow-bottom: rgba(255, 255, 255, 0.25);
  --scanline: rgba(15, 23, 42, 0.02);
  --shadow: rgba(15, 23, 42, 0.12);
  --card-border-hover: rgba(15, 23, 42, 0.24);
  --compat-border: rgba(5, 150, 105, 0.32);
  --btn-primary-bg: #0f172a;
  --btn-primary-text: #ffffff;
  --emerald: #059669;
  --cyan: #0e7490;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Public Sans", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

::selection {
  background: rgba(165, 243, 252, 0.28);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  max-height: 24px;
  object-fit: contain;
}

.brand-logo-light {
  display: none;
}

html[data-theme="light"] .brand-logo-dark {
  display: none;
}

html[data-theme="light"] .brand-logo-light {
  display: block;
}

.brand-name {
  display: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 10px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.is-active {
  border-bottom-color: var(--cyan);
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  background: var(--hover-bg);
}

.theme-toggle:active {
  transform: translateY(1px);
}

.theme-icon {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}

.icon-moon {
  opacity: 0;
  transform: rotate(-90deg);
}

html[data-theme="light"] .icon-sun {
  opacity: 0;
  transform: rotate(90deg);
}

html[data-theme="light"] .icon-moon {
  opacity: 1;
  transform: rotate(0deg);
}

.sign-in {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.sign-in:hover {
  background: var(--hover-bg);
  color: var(--text);
}

.menu-toggle {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  right: 8px;
  left: 8px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle span:nth-child(1) {
  top: 11px;
}

.menu-toggle span:nth-child(2) {
  top: 15px;
}

.menu-toggle span:nth-child(3) {
  top: 19px;
}

body.menu-open .menu-toggle span:nth-child(1) {
  top: 15px;
  transform: rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

body.menu-open .menu-toggle span:nth-child(3) {
  top: 15px;
  transform: rotate(-45deg);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 96px 32px 40px;
  background: var(--overlay-bg);
  backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, background-color 0.3s ease;
}

body.menu-open .mobile-overlay {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav a {
  padding: 14px 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

body.menu-open .mobile-nav a {
  opacity: 1;
  transform: translateY(0);
}

body.menu-open .mobile-nav a:nth-child(1) {
  transition-delay: 0.1s;
}

body.menu-open .mobile-nav a:nth-child(2) {
  transition-delay: 0.15s;
}

body.menu-open .mobile-nav a:nth-child(3) {
  transition-delay: 0.2s;
}

body.menu-open .mobile-nav a:nth-child(4) {
  transition-delay: 0.25s;
}

body.menu-open .mobile-nav a:nth-child(5) {
  transition-delay: 0.3s;
}

.mobile-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease 0.35s, transform 0.5s ease 0.35s;
}

body.menu-open .mobile-cta {
  opacity: 1;
  transform: translateY(0);
}

.site-main {
  padding-top: 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 112px 24px 80px;
  background: var(--bg);
  color: var(--text);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.top-line {
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--top-line-color), transparent);
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line-a) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-b) 1px, transparent 1px);
  background-size: 96px 96px;
  opacity: 0.7;
}

.vertical-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--glow-top), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 74%, var(--glow-bottom));
}

.scan-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, var(--scanline) 0, var(--scanline) 1px, transparent 1px, transparent 7px);
  opacity: 0.4;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  min-height: calc(100svh - 84px);
  max-width: var(--max);
  margin: 0 auto;
  padding-bottom: 80px;
}

.hero-head {
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  padding: 8px 12px;
  border: 1px solid var(--status-border);
  border-radius: 8px;
  background: var(--status-bg);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 500;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}

.hero-logo {
  display: block;
  width: min(58vw, 360px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  user-select: none;
}

.hero-logo-light {
  display: none;
}

html[data-theme="light"] .hero-logo-dark {
  display: none;
}

html[data-theme="light"] .hero-logo-light {
  display: block;
}

.hero-head h1 {
  margin: 32px auto 0;
  font-size: clamp(1.35rem, 3.35vw, 3.25rem);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}

.hero-grid {
  display: grid;
  align-items: start;
  gap: 40px;
}

.hero-copy {
  text-align: center;
}

.hero-copy > p {
  max-width: 672px;
  margin: 24px auto 0;
  font-size: 16px;
  line-height: 2;
  color: var(--body-copy);
}

.hero-actions,
.section-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-actions {
  align-items: center;
  justify-content: center;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  border: 1px solid var(--secondary-border);
  background: var(--secondary-bg);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--secondary-hover-border);
  background: var(--secondary-hover-bg);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.tag-list span {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-card);
  color: var(--tag-text);
  font-size: 12px;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

.hero-tools {
  display: grid;
  gap: 16px;
}

.terminal-card {
  padding: 16px;
  border: 1px solid var(--status-border);
  border-radius: 8px;
  background: var(--terminal-bg);
  box-shadow: 0 25px 50px -12px var(--shadow);
  text-align: left;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.terminal-path {
  min-width: 0;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: var(--faint);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compat-badge {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid var(--compat-border);
  border-radius: 4px;
  color: var(--emerald);
  font-size: 12px;
  white-space: nowrap;
}

.terminal-card pre {
  margin: 0;
  overflow-x: auto;
  color: var(--code-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.75;
}

.tile-grid {
  display: grid;
  gap: 12px;
}

.feature-tile {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-card);
  text-align: left;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.tile-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

.tile-label {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.feature-tile p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--tile-detail);
}

.content-section {
  padding: 64px 24px;
  border-top: 1px solid var(--border);
}

.section-grid {
  display: grid;
  align-items: start;
  gap: 32px;
  max-width: var(--max);
  margin: 0 auto;
}

.eyebrow {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.eyebrow-emerald {
  color: var(--emerald);
}

.eyebrow-cyan {
  color: var(--cyan);
}

.section-heading h2 {
  max-width: 576px;
  margin: 12px 0 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
}

.section-heading > p:not(.eyebrow) {
  max-width: 576px;
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}

.feature-cards {
  display: grid;
  gap: 12px;
}

.feature-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
}

.feature-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.feature-card p {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--card-body);
}

.section-actions {
  align-items: center;
  margin-top: 28px;
}

.step-list {
  display: grid;
  gap: 12px;
}

.step-card {
  display: grid;
  grid-template-columns: 3rem 1fr;
  align-items: start;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--step-bg);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.step-number {
  padding-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  color: var(--emerald);
}

.step-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.step-card p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--card-body);
  overflow-wrap: break-word;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 28px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--footer-text);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
}

.site-footer a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--footer-hover);
}

@media (min-width: 640px) {
  .brand-name {
    display: inline;
  }

  .hero-actions,
  .section-actions {
    flex-direction: row;
  }

  .tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .footer-inner {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }

  .header-actions {
    margin-left: 0;
  }

  .menu-toggle {
    display: none;
  }

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

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .hero-head h1 {
    max-width: 1104px;
    white-space: nowrap;
  }

  .hero-copy {
    text-align: left;
  }

  .hero-copy > p {
    margin-right: 0;
    margin-left: 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .tag-list {
    justify-content: flex-start;
  }

  .section-grid {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .section-grid-quick {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .section-actions {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
