:root {
  --paper: #f7f1e7;
  --paper-strong: #fffaf2;
  --ink: #21160f;
  --muted: #6f6055;
  --line: rgba(70, 45, 24, 0.12);
  --accent: #b6481f;
  --accent-deep: #7e2409;
  --accent-soft: #f4d8c9;
  --gold: #b38737;
  --success: #2a7b52;
  --warning: #a76c13;
  --danger: #b83927;
  --shadow-lg: 0 30px 60px rgba(54, 31, 12, 0.12);
  --shadow-md: 0 18px 36px rgba(54, 31, 12, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(246, 214, 175, 0.78), transparent 30%),
    radial-gradient(circle at bottom right, rgba(182, 72, 31, 0.14), transparent 26%),
    linear-gradient(160deg, #f8f2e9 0%, #efe5d8 52%, #f4ece2 100%);
  min-height: 100vh;
}

a {
  color: inherit;
}

.site-shell {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.68);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 14px;
  z-index: 20;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-copy strong {
  display: block;
  font-size: 17px;
}

.brand-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.nav-pill,
.btn-link,
.btn-solid,
.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.nav-pill {
  color: var(--muted);
  border: 1px solid transparent;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  border-color: rgba(182, 72, 31, 0.28);
  color: var(--accent-deep);
  transform: translateY(-1px);
}

.hero {
  margin-top: 24px;
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 44px 42px;
  color: #fff5ef;
  background:
    radial-gradient(circle at top right, rgba(255, 226, 207, 0.2), transparent 24%),
    linear-gradient(135deg, #ba4f1f 0%, #8e2d0c 48%, #531607 100%);
  box-shadow: var(--shadow-lg);
}

.hero::after {
  content: "";
  position: absolute;
  right: -56px;
  bottom: -56px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 248, 239, 0.08);
  border: 1px solid rgba(255, 248, 239, 0.14);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 247, 242, 0.12);
  border: 1px solid rgba(255, 247, 242, 0.18);
  font-size: 13px;
  letter-spacing: 0.6px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: end;
}

.hero h1,
.page-hero h1 {
  margin: 16px 0 14px;
  font-family: "STZhongsong", "Songti SC", "SimSun", serif;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: 1px;
}

.hero p,
.page-hero p {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 244, 236, 0.88);
  font-size: 16px;
  line-height: 1.9;
}

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

.btn-solid {
  color: #fff;
  background: linear-gradient(135deg, #f1b37c, #df7e4d);
  box-shadow: 0 16px 24px rgba(53, 21, 8, 0.2);
}

.btn-soft {
  color: #fff7f2;
  border: 1px solid rgba(255, 244, 236, 0.2);
  background: rgba(255, 248, 242, 0.08);
}

.btn-link {
  color: var(--accent-deep);
  border: 1px solid rgba(182, 72, 31, 0.2);
  background: rgba(255, 250, 242, 0.9);
}

.btn-solid:hover,
.btn-soft:hover,
.btn-link:hover {
  transform: translateY(-1px);
}

.hero-side {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 249, 242, 0.1);
  border: 1px solid rgba(255, 249, 242, 0.16);
}

.hero-side h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.hero-side ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 244, 236, 0.86);
  line-height: 1.9;
}

.section {
  margin-top: 24px;
  padding: 30px;
  border-radius: var(--radius-xl);
  background: rgba(255, 251, 244, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: 26px;
  font-family: "STZhongsong", "Songti SC", "SimSun", serif;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 16px;
}

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

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

.card,
.spec-card,
.legal-card,
.callback-card,
.contact-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--paper-strong);
  border: 1px solid var(--line);
  box-shadow: 0 14px 28px rgba(54, 31, 12, 0.06);
}

.card,
.spec-card,
.contact-card {
  padding: 22px;
}

.card h3,
.spec-card h3,
.contact-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.card p,
.spec-card p,
.contact-card p,
.legal-card p,
.callback-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.card-accent {
  position: absolute;
  inset: 0 auto auto 0;
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

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

.spec-card code,
.code-block code,
.callback-kv code,
.link-list a {
  font-family: "Consolas", "Cascadia Mono", monospace;
}

.spec-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.spec-value {
  display: block;
  word-break: break-all;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.8;
}

.highlight-box {
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(182, 72, 31, 0.08), rgba(179, 135, 55, 0.1));
  border: 1px solid rgba(182, 72, 31, 0.16);
}

.highlight-box h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.highlight-box p {
  margin: 0;
  line-height: 1.9;
}

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

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  text-decoration: none;
  border-radius: 16px;
  background: rgba(255, 248, 241, 0.9);
  border: 1px solid rgba(182, 72, 31, 0.14);
}

.page-hero {
  margin-top: 24px;
  padding: 34px 34px 28px;
  border-radius: 32px;
  color: #fff4ee;
  background: linear-gradient(135deg, #a53a16, #6b1f09);
  box-shadow: var(--shadow-lg);
}

.page-hero p {
  max-width: 760px;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 244, 236, 0.82);
  text-decoration: none;
  font-size: 14px;
}

.legal-stack,
.callback-stack {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.legal-card,
.callback-card {
  padding: 24px;
}

.legal-card h2,
.callback-card h2 {
  margin: 0 0 12px;
  font-size: 21px;
}

.legal-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.86);
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
}

.status-pill.success {
  color: #fff;
  background: linear-gradient(135deg, #2a7b52, #1e5b3d);
}

.status-pill.error {
  color: #fff;
  background: linear-gradient(135deg, #b83927, #7a2519);
}

.status-pill.idle {
  color: var(--warning);
  background: rgba(167, 108, 19, 0.12);
  border: 1px solid rgba(167, 108, 19, 0.18);
}

.callback-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 16px;
  margin-top: 18px;
}

.callback-kv {
  display: grid;
  gap: 10px;
}

.callback-item {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 244, 0.86);
}

.callback-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.code-block {
  overflow: auto;
  padding: 18px;
  border-radius: 18px;
  background: #221711;
  color: #fff4ea;
  font-size: 13px;
  line-height: 1.7;
}

.footer {
  margin-top: 26px;
  padding: 22px 4px 8px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}

.footer a {
  color: var(--accent-deep);
  text-decoration: none;
}

@media (max-width: 960px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .spec-grid,
  .callback-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .topbar {
    align-items: flex-start;
  }

  .topbar {
    border-radius: 28px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(var(--max-width), calc(100% - 20px));
    padding-top: 14px;
  }

  .topbar,
  .hero,
  .section,
  .page-hero {
    padding-left: 20px;
    padding-right: 20px;
  }

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

  .nav-pill,
  .btn-link,
  .btn-solid,
  .btn-soft {
    width: 100%;
  }
}
