:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-muted: #eef3f6;
  --ink: #142025;
  --muted: #58666d;
  --line: #d9e2e7;
  --cyan: #03a9d8;
  --amber: #d68a12;
  --emerald: #1f9a68;
  --charcoal: #263238;
  --shadow: 0 18px 48px rgba(20, 32, 37, 0.09);
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(20, 32, 37, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(20, 32, 37, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 40px 40px;
}

a {
  color: var(--charcoal);
  text-decoration-color: rgba(3, 169, 216, 0.45);
  text-underline-offset: 4px;
}

code,
pre {
  font-family: var(--mono);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 248, 251, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.github-link,
.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
}

.github-link {
  justify-self: end;
  color: #ffffff;
  background: var(--charcoal);
}

main {
  overflow: hidden;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 52px;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--emerald);
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: 4.2rem;
  line-height: 1.05;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 2.15rem;
  line-height: 1.18;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.lead {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.85;
}

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

.primary-action {
  color: #ffffff;
  background: var(--charcoal);
}

.secondary-action {
  color: var(--charcoal);
  border-color: var(--line);
  background: var(--surface);
}

.hero-visual {
  margin: 0;
  padding: 0;
}

.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(20, 32, 37, 0.05);
}

.signal-strip div {
  min-height: 92px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.signal-strip div:last-child {
  border-right: 0;
}

.signal-strip strong {
  display: block;
  margin-bottom: 6px;
  color: var(--charcoal);
  font-family: var(--mono);
  font-size: 1.45rem;
}

.signal-strip span {
  color: var(--muted);
  font-size: 0.96rem;
}

.section-band,
.page-hero {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 70px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

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

.command-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  min-height: 176px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-align: left;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20, 32, 37, 0.05);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.command-card:hover,
.command-card:focus-visible {
  border-color: rgba(3, 169, 216, 0.55);
  box-shadow: 0 16px 34px rgba(20, 32, 37, 0.09);
  transform: translateY(-2px);
}

.command-card span {
  color: var(--emerald);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.command-card code {
  display: block;
  margin: 12px 0;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.command-card small {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.command-card-accent {
  border-color: rgba(214, 138, 18, 0.38);
  background: #fffaf0;
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.split-layout .section-heading {
  display: block;
  margin: 0;
}

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

.workflow-steps article {
  min-height: 170px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20, 32, 37, 0.05);
}

.workflow-steps span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
}

.workflow-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.star-history img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20, 32, 37, 0.05);
}

.star-history {
  display: block;
}

pre {
  overflow: auto;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #dce7ec;
  line-height: 1.75;
  background: #172126;
}

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

.adapter-grid article,
.log-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20, 32, 37, 0.05);
}

.adapter-grid article {
  padding: 18px;
}

.adapter-grid p,
.log-item li {
  color: var(--muted);
  line-height: 1.75;
}

.page-hero {
  padding-top: 92px;
  padding-bottom: 48px;
}

.page-hero h1 {
  font-size: 3.4rem;
}

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

.log-item {
  padding: 24px;
}

.log-date {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 5px 10px;
  border: 1px solid rgba(31, 154, 104, 0.3);
  border-radius: 8px;
  color: var(--emerald);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  background: #effaf4;
}

.log-item ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 12px;
    padding: 14px 20px;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .github-link {
    justify-self: start;
  }

  .hero-section {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 42px;
  }

  .hero-visual {
    max-width: 620px;
  }

  .command-grid,
  .workflow-steps,
  .adapter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .split-layout {
    grid-template-columns: 1fr;
  }

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

  .signal-strip div:nth-child(2) {
    border-right: 0;
  }

  .signal-strip div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero-section,
  .signal-strip,
  .section-band,
  .page-hero {
    width: min(100% - 28px, 1180px);
  }

  .hero-section {
    gap: 28px;
    padding-bottom: 42px;
  }

  h1 {
    font-size: 2.72rem;
    line-height: 1.1;
  }

  h2 {
    font-size: 1.75rem;
  }

  .lead {
    font-size: 1.04rem;
  }

  .command-grid,
  .workflow-steps,
  .adapter-grid,
  .signal-strip {
    grid-template-columns: 1fr;
  }

  .signal-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal-strip div:last-child {
    border-bottom: 0;
  }

  .section-band,
  .page-hero {
    padding: 48px 0;
  }

  .page-hero h1 {
    font-size: 2.6rem;
  }
}
