@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
  --teal: #0B6E6E;
  --teal-deep: #085656;
  --teal-soft: #E6F3F3;
  --ink: #14212B;
  --ink-soft: #3A4A56;
  --mist: #F3F7F7;
  --mist-2: #EAF1F1;
  --line: rgba(20, 33, 43, 0.12);
  --paper: #FFFFFF;
  --accent: #C45C26;
  --max: 1120px;
  --radius: 2px;
  --font-display: "Source Serif 4", "Noto Serif SC", Georgia, serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  background-color: var(--mist);
  background-image:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 14px,
      rgba(11, 110, 110, 0.035) 14px,
      rgba(11, 110, 110, 0.035) 15px
    );
  min-height: 100vh;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  color: var(--teal-deep);
  text-decoration: underline;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ——— Nav ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 247, 247, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 64px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand-mark:hover {
  color: var(--teal);
  text-decoration: none;
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--teal);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  font-weight: 700;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: flex-end;
  padding: 5rem 0 4rem;
  background:
    linear-gradient(120deg, rgba(11, 110, 110, 0.12) 0%, transparent 45%),
    linear-gradient(180deg, #E8F2F2 0%, var(--mist) 70%, var(--mist-2) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 80px,
      rgba(20, 33, 43, 0.03) 80px,
      rgba(20, 33, 43, 0.03) 81px
    );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 14ch;
}

.hero-lead {
  margin: 0 0 2rem;
  max-width: 36rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.hero-meta {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.btn-primary:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: #fff;
}

.btn-ghost {
  background: var(--paper);
  color: var(--teal);
  border-color: rgba(11, 110, 110, 0.35);
}

.btn-ghost:hover {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-color: var(--teal);
}

.btn-block {
  width: 100%;
}

/* ——— Chapter bands ——— */
.chapter {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--line);
}

.chapter:nth-child(even) {
  background: rgba(255, 255, 255, 0.55);
}

.chapter-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.75rem;
  align-items: start;
  margin-bottom: 2rem;
  max-width: 48rem;
}

.chapter-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--teal);
  letter-spacing: -0.03em;
}

.chapter-head h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.chapter-head .deck {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.chapter p {
  margin: 0 0 1.1rem;
  color: var(--ink);
  max-width: 52rem;
}

.chapter p:last-child {
  margin-bottom: 0;
}

.prose-wide p {
  max-width: 48rem;
}

/* ——— Platform download grid ——— */
.platform-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 1.5rem;
}

.platform-item {
  background: var(--paper);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 100%;
}

.platform-item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.platform-item p {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: none;
}

.platform-icon {
  width: 36px;
  height: 36px;
  color: var(--teal);
}

/* ——— Feature list editorial ——— */
.feature-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.feature-list li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.feature-list .mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--teal);
}

.feature-list h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
  font-family: var(--font-display);
}

.feature-list p {
  margin: 0;
  color: var(--ink-soft);
}

/* ——— Quotes ——— */
.quote-stack {
  display: grid;
  gap: 0;
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.quote-block {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.quote-block blockquote {
  margin: 0 0 0.85rem;
  padding: 0;
  border: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink);
  max-width: 44rem;
}

.quote-block cite {
  display: block;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ——— Stats band ——— */
.stat-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 1.75rem;
  border: 1px solid var(--line);
  background: var(--paper);
}

.stat-cell {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--line);
}

.stat-cell:last-child {
  border-right: 0;
}

.stat-cell strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.stat-cell span {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ——— Compare table ——— */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: var(--paper);
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  padding: 0.95rem 1rem;
  text-align: left;
  border: 1px solid var(--line);
  vertical-align: top;
}

.compare-table th {
  background: var(--teal-soft);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}

.compare-table td:first-child {
  font-weight: 700;
  width: 22%;
  color: var(--ink);
}

/* ——— FAQ ——— */
.faq-list {
  margin-top: 1.25rem;
}

.faq-item {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.faq-item:first-child {
  border-top: 1px solid var(--line);
}

.faq-item h3 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.faq-item p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
}

.faq-item p:last-child {
  margin-bottom: 0;
}

/* ——— Steps ——— */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 1.25rem 0 1.25rem 4rem;
  border-bottom: 1px solid var(--line);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--teal);
}

.steps h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
}

/* ——— Article (zh-cn) ——— */
.article-hero {
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #E8F2F2 0%, var(--mist) 100%);
}

.article-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  max-width: 18ch;
}

.article-hero .lead {
  margin: 0;
  max-width: 40rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.article {
  padding: 3rem 0 4.5rem;
}

.article h2 {
  margin: 2.5rem 0 1rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.article h2:first-of-type {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.article h3 {
  margin: 1.75rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.article p {
  margin: 0 0 1.1rem;
  max-width: 48rem;
  color: var(--ink);
}

.article ul {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  max-width: 46rem;
  color: var(--ink-soft);
}

.article li {
  margin-bottom: 0.45rem;
}

.cta-strip {
  margin: 2.5rem 0;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.cta-strip p {
  margin: 0;
  flex: 1 1 16rem;
  max-width: 28rem;
  color: var(--ink-soft);
}

/* ——— Download page featured ——— */
.download-lead {
  padding: 3.5rem 0 2rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #E8F2F2 0%, var(--mist) 55%, #F7FAFA 100%);
}

.download-lead h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.15;
  max-width: 16ch;
}

.download-lead .lead {
  margin: 0 0 1.75rem;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 1.5rem;
}

.req-cell {
  background: var(--paper);
  padding: 1.5rem;
}

.req-cell h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.req-cell ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}

.req-cell li {
  margin-bottom: 0.35rem;
}

.changelog {
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.changelog article {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.changelog h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.changelog time {
  display: block;
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.changelog p {
  margin: 0;
  color: var(--ink-soft);
}

/* ——— Footer ——— */
.site-footer {
  padding: 2.75rem 0 2.5rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.82);
}

.site-footer p {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 52rem;
}

.site-footer p:last-child {
  margin-bottom: 0;
  opacity: 0.75;
}

.site-footer .safe-note {
  color: #A8D9D9;
  font-weight: 500;
}

/* ——— Utilities ——— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-ink-soft {
  color: var(--ink-soft);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ——— Responsive ——— */
@media (max-width: 960px) {
  .platform-row {
    grid-template-columns: 1fr 1fr;
  }

  .stat-band {
    grid-template-columns: 1fr;
  }

  .stat-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat-cell:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .nav-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem 0;
    gap: 0.5rem;
  }

  .nav-links {
    flex-wrap: wrap;
    width: 100%;
  }

  .nav-links a {
    padding: 0.35rem 0.65rem;
    font-size: 0.9rem;
  }

  .hero {
    min-height: auto;
    padding: 3.5rem 0 3rem;
    align-items: flex-start;
  }

  .platform-row,
  .req-grid {
    grid-template-columns: 1fr;
  }

  .feature-list li {
    grid-template-columns: 2.5rem 1fr;
  }

  .chapter {
    padding: 3.25rem 0;
  }

  .chapter-head {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .compare-table {
    display: block;
    overflow-x: auto;
  }
}
