:root {
  --bg: #f7f8f6;
  --ink: #101815;
  --muted: #65716b;
  --line: #dfe5df;
  --panel: #ffffff;
  --green: #0f7b55;
  --green-dark: #0a5f43;
  --lime: #d8f26a;
  --code: #101815;
  --code-ink: #dff7e8;
  --shadow: 0 18px 55px rgba(20, 34, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(223, 229, 223, 0.8);
  background: rgba(247, 248, 246, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--green);
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #36443d;
  font-size: 14px;
}

.nav a,
.nav-action {
  border-radius: 999px;
  padding: 9px 13px;
}

.nav a:hover,
.nav-action:hover {
  background: #eaf0ea;
}

.nav-action {
  border: 1px solid var(--line);
  font-weight: 700;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  gap: 42px;
  width: min(1180px, calc(100% - 48px));
  min-height: 620px;
  margin: 0 auto;
  padding: 92px 0 56px;
  align-items: center;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: 0;
}

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

.lead {
  max-width: 670px;
  margin: 24px 0 0;
  color: #425049;
  font-size: 20px;
  line-height: 1.65;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
}

.button.primary {
  color: #fff;
  background: var(--green);
}

.button.ghost {
  border: 1px solid var(--line);
  background: #fff;
}

.terminal-card {
  overflow: hidden;
  border: 1px solid #26362f;
  border-radius: 18px;
  background: var(--code);
  box-shadow: var(--shadow);
}

.status-card {
  border: 1px solid rgba(15, 123, 85, 0.2);
  border-radius: 22px;
  padding: 28px;
  background:
    linear-gradient(145deg, rgba(216, 242, 106, 0.22), rgba(255, 255, 255, 0.9)),
    #fff;
  box-shadow: var(--shadow);
}

.status-card h2 {
  margin: 18px 0 14px;
  font-size: 30px;
}

.status-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-card li {
  position: relative;
  padding-left: 22px;
  color: #34423b;
  line-height: 1.65;
}

.status-card li::before {
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--green-dark);
  background: #dff5e8;
  font-size: 13px;
  font-weight: 900;
}

.terminal-head {
  display: flex;
  gap: 7px;
  padding: 16px;
  border-bottom: 1px solid #273831;
}

.terminal-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
}

.terminal-card pre,
.command-item pre,
.code-stack pre,
.tabs pre,
.config pre,
.final pre {
  overflow-x: auto;
  margin: 0;
  border-radius: 14px;
  background: var(--code);
  color: var(--code-ink);
  line-height: 1.7;
}

.terminal-card pre {
  padding: 24px;
  min-height: 250px;
  font-size: 15px;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 44px;
}

.system-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 44px;
}

.system-card {
  display: grid;
  gap: 14px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(20, 34, 29, 0.08);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.system-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 123, 85, 0.35);
  box-shadow: 0 18px 42px rgba(20, 34, 29, 0.13);
}

.system-card strong {
  font-size: 25px;
}

.system-card small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.system-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.quick-links a {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  font-weight: 800;
}

.quick-links span {
  color: var(--green);
  font-size: 13px;
}

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

.section.alt {
  width: 100%;
  padding-inline: max(24px, calc((100vw - 1180px) / 2));
  background: #eef3ef;
}

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

.section h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: 0;
}

.section h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.section p,
.section li {
  color: #4b5952;
  font-size: 16px;
  line-height: 1.75;
}

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

.timeline {
  display: grid;
  gap: 16px;
}

.timeline.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.step-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: #fff;
}

.step-card.wide {
  grid-column: 1 / -1;
}

.step-card.command {
  align-items: start;
}

.step-card pre,
.panel pre,
.callout pre {
  overflow-x: auto;
  margin: 12px 0 0;
  border-radius: 14px;
  padding: 18px;
  background: var(--code);
  color: var(--code-ink);
  line-height: 1.7;
}

.step-num {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: var(--green-dark);
  background: #dff5e8;
  font-size: 14px;
  font-weight: 900;
}

.callout {
  margin-top: 18px;
  border: 1px solid rgba(15, 123, 85, 0.22);
  border-radius: 18px;
  padding: 22px;
  background: #fff;
}

.callout strong {
  font-size: 21px;
}

.openclaw-section {
  position: relative;
}

.openclaw-section > .section-heading {
  border-left: 5px solid var(--green);
  padding-left: 18px;
}

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

.module-card {
  border: 1px solid rgba(15, 123, 85, 0.2);
  border-radius: 18px;
  padding: 22px;
  background: #fff;
}

.module-card pre {
  overflow-x: auto;
  margin: 14px 0 0;
  border-radius: 14px;
  padding: 16px;
  background: var(--code);
  color: var(--code-ink);
  line-height: 1.7;
}

.compact-tabs {
  margin-top: 12px;
  border-color: #d9e6dc;
}

.compact-tabs .tab-buttons button {
  min-height: 36px;
  font-size: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  background: var(--panel);
}

.steps ol {
  margin: 0;
  padding-left: 20px;
}

.text-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--green-dark);
  font-weight: 800;
  word-break: break-word;
}

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

.command-item {
  display: grid;
  grid-template-columns: minmax(220px, 0.4fr) minmax(0, 0.6fr);
  gap: 18px;
  align-items: stretch;
  border: 1px solid #d3ddd5;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
}

.command-item pre,
.code-stack pre,
.tabs pre,
.config pre,
.final pre {
  padding: 18px;
}

.tag {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--green-dark);
  background: #e1f4e9;
  font-size: 12px;
  font-weight: 800;
}

.note {
  margin-top: 20px;
  border-left: 4px solid var(--green);
  padding-left: 16px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 28px;
  align-items: start;
}

.code-stack {
  display: grid;
  gap: 12px;
}

.requirements {
  margin-bottom: 18px;
}

.tabs {
  border: 1px solid #d3ddd5;
  border-radius: 16px;
  padding: 10px;
  background: #fff;
}

.tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tab-buttons button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: #2d3933;
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.tab-buttons button.active {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.config {
  display: grid;
  grid-template-columns: minmax(260px, 0.35fr) minmax(0, 0.65fr);
  gap: 22px;
  margin-top: 18px;
  align-items: start;
}

.final {
  text-align: center;
}

.final p {
  max-width: 720px;
  margin: 18px auto;
}

.final pre {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.source-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: #fff;
  font-weight: 800;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px max(24px, calc((100vw - 1180px) / 2));
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
  }

  .nav {
    display: none;
  }

  .hero,
  .split,
  .config,
  .command-item {
    grid-template-columns: 1fr;
  }

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

  .quick-links,
  .system-choice,
  .content-grid,
  .requirements,
  .timeline.two-col,
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar,
  .hero,
  .quick-links,
  .section,
  .section.alt {
    width: 100%;
  }

  .topbar {
    padding: 12px 16px;
  }

  .brand {
    min-width: 0;
  }

  .nav-action {
    display: none;
  }

  .hero,
  .section {
    padding-inline: 16px;
  }

  .quick-links {
    grid-template-columns: 1fr;
    padding-inline: 16px;
  }

  .system-choice {
    grid-template-columns: 1fr;
    width: 100%;
    padding-inline: 16px;
  }

  .content-grid,
  .requirements,
  .timeline.two-col,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .step-card {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .lead {
    font-size: 17px;
  }

  .footer {
    flex-direction: column;
    padding: 20px 16px;
  }
}
