:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #0f172a;
  --mute: #64748b;
  --line: #e2e8f0;
  --blue: #1d4ed8;
  --blue-hover: #1e40af;
  --blue-soft: #eff6ff;
  --blue-border: #bfdbfe;
  --accent: #0ea5e9;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --page-pad: 40px;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(29, 78, 216, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

*, ::before, ::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.68;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--blue-hover);
}

.wrap {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding-left: max(var(--page-pad), env(safe-area-inset-left, 0px));
  padding-right: max(var(--page-pad), env(safe-area-inset-right, 0px));
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
}

.brand:hover {
  color: var(--ink);
}

.brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 14.5px;
}

.nav-links a {
  color: var(--mute);
  font-weight: 500;
}

.nav-links a:hover, .nav-links a.is-on {
  color: var(--ink);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 980px;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  color: #fff !important;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.25);
}

.btn:hover {
  background: linear-gradient(135deg, var(--blue-hover), var(--blue));
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.3);
}

.btn-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 13.5px;
}

.btn-line {
  background: var(--paper);
  color: var(--ink) !important;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-line:hover {
  background: #fff;
  color: var(--blue) !important;
  border-color: var(--blue-border);
  box-shadow: var(--shadow-md);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  padding: 60px 0 32px;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 20px rgba(29, 78, 216, 0.28);
  margin-bottom: 22px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-soft);
  padding: 4px 12px;
  border-radius: 980px;
  border: 1px solid var(--blue-border);
  margin: 0 0 14px;
  width: fit-content;
}

h1 {
  font-size: 35px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 16px;
}

.tag {
  font-size: 16px;
  color: var(--mute);
  margin: 0 0 20px;
  line-height: 1.6;
}

.need {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink);
}

.need li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.need svg {
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 3px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.meta {
  font-size: 13px;
  color: var(--mute);
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Stage - Native CSS Vector Mockup */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-shot {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stage-header {
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.stage-body {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stage-status-box {
  background: var(--blue-soft);
  border: 1px solid var(--blue-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-node {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
}

.ping-badge {
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  background: #ecfdf5;
  padding: 3px 8px;
  border-radius: 980px;
}

.stage-note {
  font-size: 13px;
  color: var(--mute);
  margin-top: 14px;
  text-align: center;
}

/* TOC */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 24px 0 8px;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.toc a {
  color: var(--mute);
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.toc a:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

/* Bands & Sections */
.band {
  background: var(--paper);
  margin-top: 60px;
  margin-left: calc(-1 * max(var(--page-pad), env(safe-area-inset-left, 0px)));
  margin-right: calc(-1 * max(var(--page-pad), env(safe-area-inset-right, 0px)));
  padding: 68px max(var(--page-pad), env(safe-area-inset-right, 0px)) 68px max(var(--page-pad), env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.block {
  padding-top: 56px;
}

h2 {
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 10px;
}

.lead {
  font-size: 16.5px;
  color: var(--mute);
  margin: 0 0 28px;
  max-width: 820px;
}

/* Grids */
.features, .trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.features article, .trio article {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.features article:hover, .trio article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-border);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.features h3, .trio h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.features p, .trio p {
  margin: 0;
  color: var(--mute);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Glossary 3-grid */
.glossary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.glossary-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.glossary-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.glossary-card p {
  margin: 0;
  color: var(--mute);
  font-size: 14.5px;
}

/* Table */
.table-wrap {
  margin-top: 36px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14.5px;
}

th {
  background: #f8fafc;
  color: var(--ink);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
}

tr:last-child td {
  border-bottom: none;
}

td strong {
  color: var(--ink);
}

/* Chapters (Step by Step) */
.chapter {
  margin-top: 36px;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.chapter-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.step-num {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  padding: 4px 10px;
  border-radius: 8px;
  flex-shrink: 0;
}

.chapter-header h3 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.chapter-header p {
  margin: 0;
  color: var(--mute);
  font-size: 14px;
}

.chapter-body {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}

.chapter-body h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.chapter-body ol {
  margin: 0;
  padding-left: 20px;
  color: var(--mute);
  font-size: 14.5px;
}

.chapter-body li {
  margin-bottom: 8px;
}

.result-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  font-size: 14px;
  color: var(--mute);
}

.result-box strong {
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

/* Issues (2 Grid) */
.issues {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.issues article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.issues h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.issues p {
  margin: 0;
  color: var(--mute);
  font-size: 14.5px;
  line-height: 1.65;
}

/* Download Page Cards */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.dl-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.dl-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-border);
}

.dl-card.featured {
  border-color: var(--blue);
  background: linear-gradient(to bottom, #ffffff, #f0f7ff);
  position: relative;
}

.featured-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 980px;
}

.dl-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

.dl-card-meta {
  font-size: 12.5px;
  color: var(--mute);
  margin-bottom: 12px;
}

.dl-card p {
  font-size: 14.5px;
  color: var(--mute);
  margin: 0 0 24px;
  flex-grow: 1;
}

.dl-card .btn {
  width: 100%;
}

/* FAQ Details */
.faq {
  max-width: 820px;
  margin: 32px auto 0;
}

details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 16px 20px;
  transition: all 0.2s ease;
}

details[open] {
  border-color: var(--blue-border);
  box-shadow: var(--shadow-sm);
}

summary {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 18px;
  color: var(--mute);
  font-weight: 400;
}

details[open] summary::after {
  content: "–";
  color: var(--blue);
}

details p {
  margin: 12px 0 0;
  color: var(--mute);
  font-size: 14.5px;
  line-height: 1.6;
}

/* Footer */
.foot {
  padding: 48px 0 60px;
  font-size: 13.5px;
  color: var(--mute);
  border-top: 1px solid var(--line);
  margin-top: 80px;
  background: #f8fafc;
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.foot-links {
  display: flex;
  gap: 20px;
}

.foot-links a {
  color: var(--mute);
}

.foot-links a:hover {
  color: var(--ink);
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 40px 0 20px;
  }
  .stage {
    order: -1;
  }
  .features, .trio, .glossary {
    grid-template-columns: 1fr;
  }
  .issues {
    grid-template-columns: 1fr;
  }
  .chapter-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .nav-links {
    display: none;
  }
}
