:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --primary: #111827;
  --primary-text: #ffffff;
  --radius: 14px;
  --max: 1080px;
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans TC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --bg-soft: #14171c;
  --surface: #15181d;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --muted-2: #6b7280;
  --border: #262b33;
  --border-strong: #374151;
  --accent: #60a5fa;
  --accent-soft: #172033;
  --primary: #e5e7eb;
  --primary-text: #111827;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 13px;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.lang-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
}

.lang-wrap svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-wrap select {
  width: 104px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.lang-wrap option {
  background: var(--surface);
  color: var(--text);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#theme-toggle .icon-sun {
  display: none;
}

#theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] #theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] #theme-toggle .icon-moon {
  display: none;
}

.menu-btn {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-text);
}

.btn-primary:hover {
  opacity: 0.86;
}

.btn-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--bg-soft);
}

.btn-ghost {
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.btn-lg {
  height: 42px;
  padding: 0 16px;
  font-size: 13.5px;
}

.github-link svg {
  fill: currentColor;
  stroke: none;
}

/* Hero */
.hero {
  padding: 88px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 64px;
}

.eyebrow {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.section-head .eyebrow,
.download-copy .eyebrow {
  display: none;
}

.hero h1 {
  margin: 16px 0 4px;
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.lead {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.78;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  margin-top: 24px;
  color: var(--muted-2);
  font-size: 12.5px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
}

.hero-meta span + span::before {
  content: "·";
  margin: 0 10px;
  color: var(--border-strong);
}

.hero-shot {
  margin: 0;
  justify-self: end;
  width: min(300px, 100%);
}

.hero-shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
}

[data-theme="dark"] .hero-shot img {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

/* Sections */
.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section-muted {
  background: var(--bg-soft);
}

.section-head {
  max-width: 660px;
  margin-bottom: 30px;
}

.section-head.left {
  margin-bottom: 0;
}

.section-head h2 {
  margin: 8px 0 10px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.72;
}

/* Features */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 56px;
  border-bottom: 1px solid var(--border);
}

.feature-row {
  display: flex;
  gap: 15px;
  padding: 17px 0;
  border-top: 1px solid var(--border);
}

.feature-index {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 11px;
}

.feature-row h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.68;
}

.note {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 24px 0 0;
  padding: 13px 15px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.note strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.note.small {
  margin-top: 18px;
  font-size: 12px;
}

/* Screenshots */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.shot {
  margin: 0;
}

.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.shot figcaption {
  margin-top: 10px;
}

.shot strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13.5px;
  font-weight: 600;
}

.shot span {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* Split layouts */
.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: start;
  gap: 64px;
}

/* Steps */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--border);
}

.steps li {
  display: flex;
  gap: 17px;
  padding: 17px 0;
  border-top: 1px solid var(--border);
}

.step-num {
  flex: 0 0 auto;
  padding-top: 2px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
}

.steps h3 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 600;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

/* Compatibility */
.spec-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 56px;
  border-bottom: 1px solid var(--border);
}

.spec-list article {
  padding: 17px 0;
  border-top: 1px solid var(--border);
}

.spec-list h3 {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 600;
}

.spec-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.68;
}

/* FAQ */
.faq-list {
  border-bottom: 1px solid var(--border);
}

.faq-item {
  border-top: 1px solid var(--border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 550;
  list-style: none;
}

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

.faq-item summary svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted-2);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  transition: transform 0.18s ease, color 0.18s ease;
}

.faq-item[open] summary svg {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-item p {
  margin: 0;
  padding: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.72;
}

/* Download */
.download-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.download-copy h2 {
  margin: 8px 0 10px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.download-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.download-meta {
  display: grid;
  align-content: start;
  gap: 0;
  margin: 0;
  padding-left: 30px;
  border-left: 1px solid var(--border);
}

.download-meta > div {
  padding: 0 0 13px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--border);
}

.download-meta > div:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.download-meta dt {
  color: var(--muted);
  font-size: 11.5px;
}

.download-meta dd {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.download-meta .sha dd {
  margin-top: 7px;
}

.download-meta code {
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  word-break: break-all;
}

.privacy-line {
  display: flex;
  gap: 12px;
  margin: 18px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.65;
}

.privacy-line strong {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 600;
}

/* Footer */
.site-footer {
  padding: 26px 0;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.footer-brand span:first-of-type {
  color: var(--text);
  font-weight: 600;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.footer-links a {
  color: var(--muted);
  font-size: 12px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
  font-size: 11px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: var(--header-h);
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 1px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  }

  [data-theme="dark"] .nav-links {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  }

  .site-header.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 10px 12px;
  }

  .menu-btn {
    display: grid;
  }

  .github-link span {
    display: none;
  }

  .hero {
    padding: 56px 0 56px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-shot {
    justify-self: start;
    width: min(280px, 72vw);
  }

  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-list,
  .spec-list {
    column-gap: 36px;
  }

  .download-panel {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .download-meta {
    padding-top: 22px;
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 58px;
  }

  .container {
    padding: 0 18px;
  }

  .header-inner {
    gap: 8px;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .brand {
    font-size: 14px;
  }

  .lang-wrap {
    padding: 0 6px;
  }

  .lang-wrap svg {
    display: none;
  }

  .lang-wrap select {
    width: 94px;
    font-size: 10.5px;
  }

  .github-link,
  .header-download {
    display: none;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
  }

  .hero {
    padding: 44px 0 48px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .lead {
    font-size: 14.5px;
  }

  .section {
    padding: 52px 0;
  }

  .feature-list,
  .spec-list {
    grid-template-columns: 1fr;
  }

  .shot-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .shot {
    max-width: 300px;
  }

  .download-panel {
    padding: 22px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 4px;
  }

  .privacy-line {
    flex-direction: column;
    gap: 3px;
  }
}
