:root {
  --ink: #12241c;
  --ink-soft: #3d5248;
  --muted: #5f7468;
  --paper: #f3f7f4;
  --paper-2: #e7efe9;
  --line: rgba(18, 36, 28, 0.12);
  --accent: #0f8f5f;
  --accent-deep: #0a6b47;
  --patch: #d97706;
  --patch-deep: #b45309;
  --release: #16a34a;
  --phone: #1a2420;
  --screen: #101816;
  --max: 1120px;
  --font-display: "Sora", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "Sora", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--paper);
  line-height: 1.6;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: rgba(15, 143, 95, 0.1);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 640px at 12% -10%, rgba(15, 143, 95, 0.18), transparent 55%),
    radial-gradient(900px 520px at 88% 8%, rgba(217, 119, 6, 0.12), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(15, 143, 95, 0.08), transparent 60%),
    linear-gradient(180deg, #f7faf8 0%, #eef4f0 42%, #e8f0ea 100%);
}

a { color: var(--accent-deep); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 247, 244, 0.82);
  backdrop-filter: blur(12px);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  margin-left: auto;
  margin-right: 0.5rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover { color: var(--accent-deep); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  border-radius: 8px;
}

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

.btn-primary:hover { background: var(--accent-deep); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.btn-ghost:hover {
  background: rgba(15, 143, 95, 0.08);
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 2rem 2.5rem;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  min-height: calc(100svh - 64px);
  padding: 2.5rem 1.5rem 3rem;
}

.brand-mark {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ink);
  animation: rise 0.7s ease both;
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  animation: rise 0.7s ease 0.08s both;
}

.hero-lead {
  margin: 0 0 1.6rem;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  animation: rise 0.7s ease 0.14s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.7s ease 0.2s both;
}

.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: end;
  min-height: 420px;
  animation: rise 0.8s ease 0.18s both;
}

.signal-beam {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--patch), transparent);
  opacity: 0.55;
  animation: beam 2.8s ease-in-out infinite;
  pointer-events: none;
}

.signal-beam::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--patch);
  box-shadow: 0 0 0 6px rgba(217, 119, 6, 0.2);
  animation: packet 2.8s ease-in-out infinite;
}

.phone {
  position: relative;
  z-index: 1;
}

.phone-android { transform: translateY(18px) rotate(-3deg); }
.phone-ios { transform: translateY(-8px) rotate(3deg); }

.phone-bezel {
  border-radius: 28px;
  padding: 10px;
  background: linear-gradient(160deg, #2a3530, #121a16 55%, #0c1210);
  box-shadow:
    0 24px 50px rgba(18, 36, 28, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.phone-bezel.ios { border-radius: 32px; }

.phone-screen {
  border-radius: 20px;
  overflow: hidden;
  background: var(--screen);
  aspect-ratio: 9 / 17;
}

.demo-app {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
  height: 100%;
  padding: 1.1rem;
  color: #e8f2ea;
  background:
    radial-gradient(120px 80px at 20% 15%, rgba(61, 207, 142, 0.18), transparent),
    linear-gradient(180deg, #15201b, #0e1412);
}

.os-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9bb0a1;
}

.demo-label {
  margin: 0;
  font-size: 0.8rem;
  color: #9bb0a1;
}

.marker {
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.5s ease, color 0.5s ease, box-shadow 0.5s ease;
}

.marker[data-phase="release"] {
  background: rgba(22, 163, 74, 0.22);
  color: #86efac;
  box-shadow: inset 0 0 0 1px rgba(134, 239, 172, 0.35);
}

.marker[data-phase="patch"] {
  background: rgba(217, 119, 6, 0.24);
  color: #fdba74;
  box-shadow: inset 0 0 0 1px rgba(253, 186, 116, 0.4);
}

.demo-caption {
  margin: 0;
  font-size: 0.75rem;
  color: #7f9588;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.section-alt {
  position: relative;
}

.section-alt::before {
  content: "";
  position: absolute;
  inset: 0 -100vw;
  z-index: -1;
  background: rgba(15, 143, 95, 0.045);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.25rem;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.about-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2rem;
}

.flow-num {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.flow-step h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.flow-step p {
  margin: 0;
  color: var(--muted);
}

.cap-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2.5rem;
}

.cap-list h3 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
}

.cap-list p {
  margin: 0;
  color: var(--muted);
}

.plan-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}

.plan-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.plan-cloud .plan-kicker { color: var(--patch-deep); }

.plan h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.plan-lead {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.plan ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--muted);
}

.plan li + li { margin-top: 0.35rem; }

.demo-stage { max-width: 920px; }

.demo-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  margin-bottom: 1.75rem;
}

.demo-panel {
  margin: 0;
}

.demo-panel figcaption {
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(15, 143, 95, 0.12), rgba(18, 36, 28, 0.06)),
    #dfe8e2;
  aspect-ratio: 9 / 16;
  max-width: 280px;
  box-shadow: 0 16px 36px rgba(18, 36, 28, 0.12);
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #101816;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.video-frame.is-ready video {
  opacity: 1;
}

.video-load-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: calc(100% - 2rem);
  max-width: 12rem;
  height: fit-content;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: rgba(15, 143, 95, 0.95);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  z-index: 2;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* author `display` must not override the HTML hidden attribute */
.video-load-btn[hidden],
.video-empty[hidden],
.video-frame.is-configured .video-empty {
  display: none !important;
}

.video-frame.is-ready .video-load-btn,
.video-frame.is-loading .video-load-btn {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}

.video-frame.is-loading::after {
  content: "加载中…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-weight: 600;
  background: rgba(223, 232, 226, 0.72);
  z-index: 1;
}

.video-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  background: rgba(223, 232, 226, 0.55);
  z-index: 2;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.demo-note {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.cta-band {
  text-align: center;
  padding-bottom: 2.5rem;
}

.cta-band h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
}

.cta-band p {
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
}

.faq-section .section-head {
  margin-bottom: 1.5rem;
}

.faq-status {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.faq-status.is-error {
  color: #b45309;
}

.page-downloads .site-header .nav a[aria-current="page"] {
  color: var(--accent-deep);
}

.downloads-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.downloads-page-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.install-code {
  margin: 0 0 0.85rem;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  border-radius: 10px;
  background: #12241c;
  color: #e8f0ea;
  font-size: 0.88rem;
  line-height: 1.55;
}

.install-code code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.install-hint {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 42rem;
}

.downloads-shell {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 1.5rem 1.75rem;
  align-items: start;
}

.downloads-side {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: sticky;
  top: 5.25rem;
}

.downloads-cat {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.downloads-cat:hover {
  background: rgba(15, 143, 95, 0.06);
}

.downloads-cat.is-active {
  border-color: rgba(15, 143, 95, 0.45);
  background: rgba(15, 143, 95, 0.1);
}

.downloads-cat-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
}

.downloads-main {
  min-width: 0;
}

.install-panel {
  margin-bottom: 1.75rem;
  padding: 1.35rem 1.35rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 143, 95, 0.08), transparent 55%),
    rgba(255, 255, 255, 0.55);
}

.install-panel h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.versions-panel {
  min-width: 0;
}

.versions-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.version-list {
  display: flex;
  flex-direction: column;
}

.version-row {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}

.version-row:last-child {
  border-bottom: 0;
}

.version-row-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.version-row.is-expandable > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-right: 1.75rem;
  position: relative;
}

.version-row.is-expandable > summary::-webkit-details-marker {
  display: none;
}

.version-row.is-expandable > summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  transition: transform 0.18s ease;
}

.version-row.is-expandable[open] > summary::after {
  content: "−";
}

.version-row-hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.version-row-body {
  margin-top: 0.65rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.version-row-body.md > :first-child {
  margin-top: 0;
}

.version-row-body.md > :last-child {
  margin-bottom: 0;
}

@media (max-width: 800px) {
  .downloads-shell {
    grid-template-columns: 1fr;
  }

  .downloads-side {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .downloads-cat {
    flex: 1 1 12rem;
  }
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 44rem;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0.15rem 0 0.75rem;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 0.65rem 1.75rem 0.65rem 0;
  position: relative;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  transition: transform 0.18s ease;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-answer {
  padding: 0 0 0.5rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.faq-answer.md > *:first-child { margin-top: 0; }
.faq-answer.md > *:last-child { margin-bottom: 0; }

.faq-answer.md p,
.faq-answer.md ul,
.faq-answer.md ol {
  margin: 0.55rem 0;
}

.faq-answer.md ul,
.faq-answer.md ol {
  padding-left: 1.2rem;
}

.faq-answer.md a {
  color: var(--accent-deep);
}

.faq-answer.md code {
  font-size: 0.88em;
}

.faq-answer.md pre {
  overflow-x: auto;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: rgba(18, 36, 28, 0.06);
}

.faq-answer.md pre code {
  background: none;
  padding: 0;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .brand {
  font-size: 1rem;
  color: var(--ink);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-left: auto;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover { color: var(--accent-deep); }

.access-dialog {
  border: 0;
  border-radius: 18px;
  padding: 0;
  width: min(94vw, 440px);
  background: transparent;
  box-shadow: 0 28px 80px rgba(18, 36, 28, 0.28);
}

.access-dialog::backdrop {
  background: rgba(12, 24, 18, 0.45);
  backdrop-filter: blur(4px);
}

.access-sheet {
  position: relative;
  margin: 0;
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 18px;
  background: #f7faf8;
  text-align: center;
  animation: pop 0.22s ease;
}

.access-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.access-sheet h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.access-sheet > p {
  margin: 0 0 1.1rem;
  color: var(--muted);
}

.qr-frame {
  display: grid;
  place-items: center;
  min-height: 320px;
  margin: 0 auto 0.85rem;
  padding: 0.85rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.qr-frame img {
  display: block;
  width: min(320px, 78vw);
  height: min(320px, 78vw);
  object-fit: contain;
  background: #fff;
}

.qr-fallback {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.qr-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes beam {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.7; }
}

@keyframes packet {
  0% { left: 0%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: calc(100% - 12px); opacity: 0; }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.75rem;
  }

  .hero h1 { max-width: none; }

  .hero-stage {
    max-width: 420px;
    min-height: 340px;
    margin: 0 auto;
  }

  .about-flow,
  .cap-list,
  .plan-split,
  .demo-compare {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header { flex-wrap: wrap; }
  .nav {
    order: 3;
    width: 100%;
    margin: 0.25rem 0 0;
  }
  .site-header .btn-sm { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
