:root {
  color-scheme: light;
  --paper: #f3efe7;
  --paper-deep: #e9e2d5;
  --ink: #17231f;
  --muted: #68716c;
  --line: rgba(23, 35, 31, 0.16);
  --green: #1f5b47;
  --green-dark: #164436;
  --green-soft: #dce8e1;
  --red: #9b352a;
  --white: #fffef9;
  --shadow: 0 28px 80px rgba(30, 42, 36, 0.12);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 15% 4%, rgba(255, 255, 255, 0.9), transparent 32rem),
    linear-gradient(180deg, var(--paper) 0%, #f7f4ed 55%, var(--paper) 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  color: white;
}

.brand-mark svg {
  width: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.brand strong {
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.22em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: #424d48;
  font-size: 14px;
  text-decoration: none;
}

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

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c2973d;
  box-shadow: 0 0 0 4px rgba(194, 151, 61, 0.12);
}

.status-chip.online .status-dot {
  background: #2f8b64;
  box-shadow: 0 0 0 4px rgba(47, 139, 100, 0.13);
}

.status-chip.error .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(155, 53, 42, 0.12);
}

main {
  overflow: hidden;
}

.hero {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 104px 0 80px;
}

.hero-copy {
  max-width: 1080px;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.hero h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.hero h1 span {
  color: var(--green);
  font-style: italic;
}

.hero-lead {
  max-width: 650px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.install-shell {
  margin-top: 64px;
}

.install-heading {
  max-width: 700px;
}

.install-heading h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(31px, 4vw, 46px);
  font-weight: 500;
  line-height: 1.28;
}

.install-heading > p:last-child {
  max-width: 610px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.install-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.install-card {
  min-width: 0;
  padding: 30px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(23, 35, 31, 0.12);
  border-radius: 22px;
  background: rgba(255, 254, 249, 0.92);
  box-shadow: 0 18px 54px rgba(28, 41, 34, 0.08);
}

.install-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.install-index {
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.install-type {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.install-card h3 {
  margin: 28px 0 12px;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
}

.install-card > p {
  min-height: 52px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.install-prompt {
  min-height: 188px;
  margin: 22px 0;
  padding: 17px 18px;
  overflow: auto;
  border: 1px solid rgba(23, 35, 31, 0.14);
  border-radius: 13px;
  background: #17231f;
  color: #d7e1dc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.install-card .primary-button {
  width: 100%;
  height: 58px;
  margin-top: auto;
}

.package-preview {
  min-height: 188px;
  margin: 22px 0;
  padding: 25px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px dashed rgba(31, 91, 71, 0.35);
  border-radius: 13px;
  background: var(--green-soft);
}

.package-icon {
  width: 52px;
  height: 52px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  color: white;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.package-preview strong,
.package-preview small {
  display: block;
}

.package-preview strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.package-preview small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.install-download {
  text-decoration: none;
}

.install-text-link {
  align-self: center;
  margin-top: 16px;
  color: var(--green);
  font-size: 12px;
  text-underline-offset: 4px;
}

.query-shell {
  position: relative;
  z-index: 5;
  margin-top: 64px;
}

.query-form {
  min-height: 112px;
  padding: 16px 18px 16px 28px;
  display: grid;
  grid-template-columns: minmax(280px, 1.55fr) 1px minmax(190px, 0.8fr) auto;
  align-items: center;
  gap: 22px;
  border: 1px solid rgba(23, 35, 31, 0.12);
  border-radius: 24px;
  background: rgba(255, 254, 249, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.field-group {
  min-width: 0;
}

.field-group label {
  display: block;
  margin-bottom: 9px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.field-group input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
}

.field-group input::placeholder {
  color: #9ba09c;
}

.field-divider {
  width: 1px;
  height: 52px;
  background: var(--line);
}

.input-wrap {
  position: relative;
}

.suggestions {
  position: absolute;
  top: calc(100% + 22px);
  left: -18px;
  right: -18px;
  z-index: 20;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 22px 45px rgba(27, 39, 33, 0.14);
}

.suggestions button {
  width: 100%;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.suggestions button:hover,
.suggestions button:focus-visible {
  background: var(--green-soft);
  outline: 0;
}

.suggestions small {
  flex: 0 0 auto;
  color: var(--muted);
}

.primary-button {
  height: 72px;
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  border-radius: 18px;
  background: var(--green);
  color: white;
  font-weight: 650;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.primary-button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-queries {
  margin-top: 19px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.quick-queries button {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: #4c5752;
  cursor: pointer;
}

.quick-queries button:hover {
  border-color: var(--green);
  color: var(--green);
}

.result-region {
  width: min(1080px, calc(100% - 40px));
  min-height: 110px;
  margin: 0 auto 54px;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #919892;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.empty-rule {
  width: 72px;
  height: 1px;
  background: var(--line);
}

.loading-card,
.message-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 18px 60px rgba(28, 41, 34, 0.09);
}

.loading-card,
.message-card {
  padding: 38px;
  text-align: center;
}

.loading-pulse {
  width: 30px;
  height: 30px;
  margin: 0 auto 15px;
  border: 2px solid var(--green-soft);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.message-card h2 {
  margin: 0 0 10px;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-weight: 500;
}

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

.candidate-list {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
}

.candidate-list button {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--green);
  cursor: pointer;
}

.result-card {
  overflow: hidden;
}

.result-head {
  padding: 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(220, 232, 225, 0.38);
}

.breadcrumbs {
  color: var(--muted);
  font-size: 12px;
}

.copy-result {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--green);
  cursor: pointer;
}

.result-body {
  padding: clamp(30px, 5vw, 58px);
}

.result-title {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 500;
  line-height: 1.38;
}

.result-meta {
  margin: 20px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  padding: 6px 9px;
  border-radius: 8px;
  background: #f0eee7;
  color: #5f6863;
  font-size: 11px;
}

.article-content {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 20px;
  line-height: 2;
  white-space: pre-wrap;
}

.source-row {
  margin-top: 34px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
}

.source-row a {
  color: var(--green);
  text-underline-offset: 3px;
}

.facts {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts article {
  min-height: 180px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.facts article + article {
  border-left: 1px solid var(--line);
}

.fact-label {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.facts strong {
  margin-top: 12px;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 46px;
  font-weight: 500;
}

.facts strong.version-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 21px;
}

.facts small {
  margin-top: 4px;
  color: var(--muted);
}

.api-section {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 120px 0;
  display: grid;
  grid-template-columns: 0.85fr 1.3fr;
  gap: 74px;
  align-items: center;
}

.section-heading h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 42px;
  font-weight: 500;
  line-height: 1.28;
}

.section-heading > p:last-child {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.api-card {
  overflow: hidden;
  border-radius: 20px;
  background: #17231f;
  color: #eef5f1;
  box-shadow: 0 26px 70px rgba(22, 38, 31, 0.2);
}

.api-card-head {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.api-card-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.method {
  padding: 5px 7px;
  border-radius: 6px;
  background: #5fc495;
  color: #10261c;
  font-size: 10px;
  font-weight: 800;
}

.api-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.copy-button {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: transparent;
  color: #cbd8d1;
  font-size: 11px;
  cursor: pointer;
}

.api-card pre {
  margin: 0;
  padding: 30px 24px;
  overflow-x: auto;
  color: #d7e1dc;
  font-size: 13px;
  line-height: 1.75;
}

.api-links {
  padding: 16px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.api-links a {
  color: #8ed6b4;
  font-size: 12px;
  text-decoration: none;
}

.about-section {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto 120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.about-section article {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 254, 249, 0.55);
}

.about-index {
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.about-section h3 {
  margin: 32px 0 13px;
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 25px;
  font-weight: 500;
}

.about-section p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  border-top: 1px solid var(--line);
}

footer strong {
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-size: 18px;
}

footer p {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 11px;
}

.footer-links a {
  text-decoration: none;
}

@media (max-width: 800px) {
  .site-nav > a {
    display: none;
  }

  .hero {
    padding-top: 72px;
  }

  .hero h1 {
    font-size: clamp(45px, 13vw, 68px);
  }

  .install-grid {
    grid-template-columns: 1fr;
  }

  .query-form {
    padding: 24px;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .field-divider {
    width: 100%;
    height: 1px;
  }

  .primary-button {
    height: 60px;
  }

  .suggestions {
    top: calc(100% + 13px);
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .facts article {
    min-height: 140px;
  }

  .facts article + article {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .api-section {
    padding: 88px 0;
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .about-section {
    grid-template-columns: 1fr;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .site-header,
  .hero,
  .result-region,
  .facts,
  .api-section,
  .about-section,
  footer {
    width: min(100% - 28px, 1080px);
  }

  .site-header {
    height: 76px;
  }

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

  .status-chip {
    padding: 7px 9px;
    font-size: 10px;
  }

  .hero {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .hero-lead {
    font-size: 15px;
  }

  .install-shell {
    margin-top: 42px;
  }

  .install-card {
    padding: 23px;
  }

  .query-shell {
    margin-top: 42px;
  }

  .quick-queries {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-head,
  .source-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .article-content {
    font-size: 18px;
  }

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

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

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