:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #eef3f9;
  --ink: #111827;
  --muted: #5d6878;
  --faint: #8792a2;
  --line: #dce3ed;
  --accent: #0b63ce;
  --accent-dark: #084b9d;
  --ok-bg: #e7f7ef;
  --ok: #176b3f;
  --warn-bg: #fff1f1;
  --warn: #a13b3b;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(41, 59, 88, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: #f9fbff;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 20% 0%, rgba(11, 99, 206, 0.10), transparent 32rem),
    linear-gradient(180deg, #f9fbff 0%, var(--bg) 44%, #eef3f9 100%);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a, button {
  -webkit-tap-highlight-color: transparent;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

.page {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 56px);
  overflow-x: hidden;
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 750;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.94rem;
  white-space: nowrap;
}

.nav-links a,
footer a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
footer a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  align-items: center;
  gap: clamp(28px, 6vw, 76px);
  padding: clamp(34px, 6vw, 76px) 0 clamp(42px, 7vw, 86px);
}

.hero > * { min-width: 0; }

.hero-copy {
  max-width: 680px;
  min-width: 0;
}

.kicker {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 750;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(2.45rem, 4.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 820;
  white-space: nowrap;
}

.hero-copy p:not(.kicker) {
  max-width: 560px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.hero-card,
.quick-install-card,
.step,
.perm,
.asr-option,
.faq {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(220, 227, 237, 0.92);
  border-radius: var(--radius);
}

.hero-card {
  min-width: 0;
  overflow: hidden;
  padding: clamp(24px, 4vw, 34px);
  box-shadow: var(--shadow);
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex: 0 0 auto;
}

.app-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.meta-label,
.updated {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.version {
  display: block;
  color: var(--ink);
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
  font-size: 1rem;
  line-height: 1.45;
  white-space: nowrap;
}

.download-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
}

.download-btn,
.quick-install-trigger {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-size: 1rem;
  font-weight: 760;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.download-btn:focus,
.quick-install-trigger:focus,
.copy-btn:focus {
  outline: none;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .download-btn:focus-visible,
  .quick-install-trigger:focus-visible,
  .copy-btn:focus-visible {
    outline: 2px solid rgba(11, 99, 206, 0.45);
    outline-offset: 3px;
  }
}

.download-btn {
  background: var(--accent);
  color: #fff;
}

.download-btn:hover { background: var(--accent-dark); }
.download-btn:active,
.quick-install-trigger:active { transform: translateY(1px) scale(0.99); }

.quick-install-trigger {
  background: #fff;
  border: 1px solid rgba(11, 99, 206, 0.22);
  color: var(--accent);
  padding: 0 14px;
}

.quick-install-trigger:hover {
  background: rgba(11, 99, 206, 0.06);
  border-color: rgba(11, 99, 206, 0.32);
}

.meta,
.hint {
  color: var(--faint);
  font-size: 0.88rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.section {
  padding: clamp(34px, 5vw, 62px) 0;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

h2 {
  margin-bottom: 20px;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.4vw, 2.25rem);
  line-height: 1.14;
  letter-spacing: 0;
  font-weight: 820;
}

h3 {
  color: var(--ink);
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.step,
.perm,
.asr-option {
  padding: 20px;
  margin-bottom: 14px;
}

.step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
}

.step-num {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(11, 99, 206, 0.10);
  color: var(--accent);
  font-weight: 820;
  font-size: 0.88rem;
}

.step-special .step-num {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

strong { color: var(--ink); }

.step strong,
.perm-header strong {
  display: block;
  margin-bottom: 10px;
}

.step p,
.step li,
.perm-desc,
.perm-steps,
.asr-option p,
.asr-option ol,
.faq p,
.faq ul {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.step ul,
.perm-steps,
.asr-option ol,
.faq ul {
  padding-left: 1.25rem;
  margin-top: 8px;
}

.cmd {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: transparent;
  color: var(--accent-dark);
  border: 0;
  padding: 0.7rem 0 0.7rem 0.85rem;
  border-radius: 0;
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
  font-size: 0.86rem;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

.cmd-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: #e9eef6;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0.65rem 0;
  overflow: hidden;
}

.copy-btn {
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.copy-btn:hover { color: var(--accent-dark); }
.copy-btn:active { color: var(--accent); }
.copy-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}
.icon-check { display: none; }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; }

.quick-install {
  height: 0;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: height 0.24s ease, opacity 0.18s ease, transform 0.24s ease, margin-bottom 0.24s ease;
  will-change: height, opacity, transform;
}

.quick-install[hidden] {
  display: block;
}

.quick-install.is-open {
  margin: 0 0 32px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.quick-install-card {
  padding: 18px 22px;
}

@media (prefers-reduced-motion: reduce) {
  .quick-install { transition: none; }
}

.quick-install-title {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px;
}

.quick-install p { margin: 10px 0; }

.quick-install code:not(.cmd) {
  background: #e9eef6;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  font-size: 0.9em;
  color: var(--ink);
}

.quick-install a,
.asr-option a {
  color: var(--accent);
  font-weight: 700;
}

.perm-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.perm-badge,
.tag {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  font-size: 0.74rem;
  font-weight: 760;
}

.perm-badge.required {
  background: var(--warn-bg);
  color: var(--warn);
}

.perm-badge.auto,
.tag.optional {
  background: var(--ok-bg);
  color: var(--ok);
}

.tag {
  display: inline-flex;
  margin-left: 8px;
  background: rgba(11, 99, 206, 0.10);
  color: var(--accent);
  vertical-align: middle;
}

.faq {
  margin-bottom: 10px;
  overflow: hidden;
}

.faq summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
  list-style: none;
}

.faq summary::before {
  content: ">";
  color: var(--accent);
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.faq[open] summary::before { transform: rotate(90deg); }
.faq > p,
.faq > ul,
.faq > code,
.faq > .cmd-row { margin: 0 18px 16px; }
.faq > .cmd-row { width: auto; }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 42px;
  color: var(--faint);
  font-size: 0.92rem;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

footer a { color: var(--muted); }
.sep { margin: 0 0.5rem; color: var(--line); }
.beian { text-align: right; }

@media (max-width: 760px) {
  .page {
    width: calc(100vw - 36px);
    padding: 0;
  }
  .nav { min-height: 64px; }
  .brand span { max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-links { display: none; }
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0 48px;
  }
  .hero-copy p:not(.kicker) { max-width: 100%; }
  h1 {
    font-size: clamp(2rem, 9vw, 2.7rem);
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .download-actions { grid-template-columns: 1fr; }
  .download-btn,
  .quick-install-trigger { max-width: 100%; }
  .step {
    display: block;
    position: relative;
  }
  .step-num {
    position: absolute;
    left: 20px;
    top: 20px;
  }
  .step-body > strong:first-child {
    min-height: 30px;
    display: flex;
    align-items: center;
    padding-left: 44px;
  }
  .cmd { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
  .perm-header { align-items: flex-start; flex-direction: column; }
  footer {
    align-items: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .beian { text-align: center; }
}
