:root {
  --bg: #f4eadf;
  --bg-warm: #efe2d0;
  --surface: rgba(255, 249, 241, 0.82);
  --surface-strong: rgba(255, 251, 245, 0.96);
  --surface-dark: rgba(27, 35, 39, 0.95);
  --text: #172126;
  --muted: #55636c;
  --accent: #d65b2d;
  --accent-strong: #0e8f84;
  --border: rgba(23, 33, 38, 0.12);
  --shadow: 0 24px 80px rgba(29, 35, 40, 0.12);
  --shadow-strong: 0 38px 110px rgba(29, 35, 40, 0.2);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1180px;
  --font-sans: "Space Grotesk", "Avenir Next", "Segoe UI Variable",
    "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", "Consolas",
    "Liberation Mono", monospace;
  --font-cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(214, 91, 45, 0.15), transparent 34%),
    radial-gradient(circle at right 20%, rgba(14, 143, 132, 0.15), transparent 32%),
    linear-gradient(180deg, var(--bg) 0%, #f7f1e7 50%, var(--bg-warm) 100%);
}

img {
  display: block;
  max-width: 100%;
}

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

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

html[lang^="zh"] body {
  font-family: var(--font-cjk);
}

html[lang^="zh"] .hero h1,
html[lang^="zh"] .page-hero h1,
html[lang^="zh"] .section h2 {
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.background-glow {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.54;
  pointer-events: none;
  z-index: 0;
}

.background-glow-a {
  top: -10rem;
  left: -8rem;
  background: rgba(214, 91, 45, 0.18);
}

.background-glow-b {
  top: 12rem;
  right: -8rem;
  background: rgba(14, 143, 132, 0.18);
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  padding: 1rem 1.25rem 0;
}

.topbar-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.95rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 32px rgba(28, 36, 41, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand img {
  width: 2.35rem;
  height: 2.35rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.nav a {
  padding: 0.62rem 0.9rem;
  border-radius: 999px;
  font-size: 0.94rem;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav a:hover,
.nav a.is-active {
  background: rgba(23, 33, 38, 0.08);
  color: var(--text);
}

.nav-cta {
  background: var(--text);
  color: #fff7ef !important;
}

.nav-cta:hover {
  background: #243139 !important;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.25rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(23, 33, 38, 0.06);
}

.language-switcher a {
  min-width: 3.1rem;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.language-switcher a.is-active {
  background: var(--text);
  color: #fff7ef;
}

.nav-toggle {
  display: none;
  min-height: 2.8rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.86);
  color: var(--text);
  font: inherit;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.4rem 1.25rem 5rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero,
.page-hero,
.section,
.footer,
.info-strip {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: center;
  padding: 3.4rem 0 2rem;
}

.page-hero {
  padding: 4rem 0 1.4rem;
  max-width: 54rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-strong);
}

.hero h1,
.page-hero h1,
.section h2 {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.hero h1 {
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  max-width: 11ch;
}

.page-hero h1,
.section h2 {
  font-size: clamp(2.25rem, 4vw, 4.3rem);
  max-width: 14ch;
}

.lede,
.section-intro,
.content-card p,
.metric-card span,
.link-card span,
.callout p,
.workflow-step p,
.footer p,
.info-strip p {
  color: var(--muted);
  line-height: 1.72;
}

.lede {
  margin: 1.3rem 0 0;
  max-width: 40rem;
  font-size: 1.12rem;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.82rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--text);
  color: #fff7ef;
  box-shadow: 0 18px 44px rgba(24, 33, 37, 0.18);
}

.button-secondary {
  background: rgba(255, 250, 244, 0.82);
  border-color: var(--border);
}

.terminal-chip,
.code-block {
  border-radius: var(--radius-md);
  background: rgba(23, 33, 38, 0.95);
  color: #fff0de;
}

.terminal-chip {
  display: inline-flex;
  gap: 0.85rem;
  align-items: center;
  margin-top: 1.4rem;
  padding: 1rem 1.05rem;
  max-width: 100%;
  overflow: auto;
}

.terminal-chip span {
  color: #ffb486;
}

.kpi-grid,
.card-grid,
.detail-grid,
.link-grid,
.workflow-grid,
.code-grid {
  display: grid;
  gap: 1rem;
}

.kpi-grid {
  margin-top: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.metric-card,
.content-card,
.link-card,
.workflow-step,
.callout,
.info-strip,
.section-cta,
.table-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.metric-card,
.content-card,
.link-card,
.workflow-step,
.callout,
.section-cta,
.table-shell {
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}

.metric-card strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.06em;
  margin-bottom: 0.3rem;
}

.content-card h3,
.workflow-step h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

.content-card p,
.link-card span,
.workflow-step p,
.callout p {
  margin: 0;
}

.section {
  padding-top: 4.8rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 1.35rem;
}

.section-intro {
  max-width: 30rem;
  margin: 0;
}

.hero-visual {
  align-self: start;
}

.screen-shell {
  padding: 1rem;
  border-radius: var(--radius-xl);
  background: rgba(23, 33, 38, 0.9);
  box-shadow: var(--shadow-strong);
  transform: rotate(1.2deg);
}

.screen-bar {
  display: flex;
  gap: 0.42rem;
  margin-bottom: 0.8rem;
}

.screen-bar span {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: rgba(255, 246, 236, 0.34);
}

.screen-shell img {
  width: 100%;
  border-radius: 18px;
}

.info-strip {
  padding: 1rem 1.2rem;
  border-radius: var(--radius-lg);
}

.info-strip p {
  margin: 0;
}

.link-card {
  display: block;
}

.link-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.code-block {
  margin: 0.9rem 0 0;
  padding: 1rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
}

.hero-code {
  margin-top: 1.5rem;
  display: inline-block;
}

.table-shell {
  overflow: auto;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.docs-table th,
.docs-table td {
  padding: 1rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(23, 33, 38, 0.1);
}

.docs-table thead th {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}

.docs-table tbody tr:last-child td {
  border-bottom: none;
}

.workflow-step span {
  display: inline-flex;
  margin-bottom: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.callout {
  background: linear-gradient(135deg, rgba(14, 143, 132, 0.12), rgba(255, 249, 241, 0.9));
}

.checklist,
.step-list {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
}

.checklist li,
.step-list li {
  margin-bottom: 0.45rem;
  line-height: 1.6;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-list details {
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-list p {
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.card-meta em {
  font-style: normal;
  color: var(--accent-strong);
  font-size: 0.86rem;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.24rem 0.72rem;
  border-radius: 999px;
  background: rgba(14, 143, 132, 0.12);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.insight-card {
  min-height: 100%;
}

.insight-card em {
  display: inline-block;
}

.article-list-card {
  margin-top: 1rem;
}

.article-list {
  margin-top: 0;
}

.category-card,
.insight-card {
  min-height: 100%;
}

.card-caption {
  margin-top: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.section-cta {
  margin-top: 4.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.4rem 1.25rem 3.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer strong {
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  .hero,
  .card-grid,
  .detail-grid,
  .link-grid,
  .workflow-grid,
  .code-grid,
  .section-cta {
    grid-template-columns: 1fr;
  }

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

  .section-heading,
  .section-cta,
  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 820px) {
  .topbar {
    padding: 0.9rem 1rem 0;
  }

  .topbar-shell {
    border-radius: 26px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-shell.nav-open .nav {
    display: flex;
  }

  .nav a {
    width: 100%;
  }

  .language-switcher {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .hero h1,
  .page-hero h1,
  .section h2 {
    max-width: none;
  }
}

@media (max-width: 560px) {
  main {
    padding: 1rem 1rem 4rem;
  }

  .hero {
    padding-top: 2.8rem;
  }

  .terminal-chip {
    display: block;
    border-radius: var(--radius-md);
  }

  .button {
    width: 100%;
  }
}
